Copyright (c) 2024 Stephan Gatzka. See the LICENSE file for license rights and limitations (MIT).
Create a build directory and change into it:
mkdir /tmp/cio && cd /tmp/cio
Configure the project using cmake:
cmake -DCMAKE_TOOLCHAIN_FILE=$PWD/toolchains/x86-linux-clang-14.cmake <path/to/cio/src/dir>
Please not that the passage with -DCMAKE_TOOLCHAIN_FILE
is optional, if you want to use the build hosts gcc. By default cio is build as a static library. If you want to build a shared library instead, add -DBUILD_SHARED_LIBS=ON
to the configuration command line.
If you want to speed up the build, choose the Ninja generator by adding -GNinja
to the configuration command line.
Then build the project:
cmake --build .
Run the unit test by issueing the following command:
cmake --build . --target test
Continuous Integration builds are done using ctest. You can also run them locally. For instance, to run the CI build that gives you the code coverage of the unit test,run:
ctest -S ~/workspace/git/cio/build.cmake -DCTEST_TOOLCHAIN_FILE=toolchains/x86-linux-gcc.cmake -DCTEST_CONFIGURATION_TYPE:STRING=Coverage