Custom search paths to dependent packages can be provided with the following CMake options (or environment variable):
Option / Environment Variable
Add search path to doxygen program.
Add search path to sphinx-build program.
Add search path to clang-format program.
Obtain a copy of the source by either downloading the zipball or cloning the public repository:
git clone firstname.lastname@example.org:buddly27/awesome-project.git
Then you can build and install the library as follows:
cmake -DCMAKE_INSTALL_PREFIX=/path/to/destination -S . -B ./build ..
cmake --build ./build --target install
Here are a few CMake options that can be used to influence the building process:
Indicate whether tests should be built. Default is true.
Indicate whether documentation should be built. Default is true.
Indicate whether library should be built shared. Default is true.
Indicate the C++ standard requested. Default is C++ 14.
The build type can be influenced by the CMAKE_BUILD_TYPE option or environment variable. By default, the “Release” build type will be used.
The library can then be used by other programs or libraries via the following Cmake target:
Ensure that Clang-format is installed for applying C++ style.
Then run the program as follows:
cmake --build ./build --target format
When contributing, please run this command before committing your code.
Then build the documentation as follows:
cmake --build ./build --target documentation
Documentation is automatically built with default installation, unless you
BUILD_DOCS CMake option to false.
Ensure that GTest is installed.
Once the library and all tests are built, you can run the tests using Ctest within the build folder as follows:
You can increase the verbosity and filter in one or several tests as follows:
ctest -R MyTest.DoSomething -VV
ctest -R MyTest.* -VV
Tests are automatically built with default installation, unless you
BUILD_TESTS CMake option to false.