Developer guide¶
Build and run tests¶
In the main repository, do
mkdir build && cd build
cmake ..
make build-tests
ctest
The following cmake options can be used:
-DCMAKE_BUILD_TYPE=Debugfor running tests in debug mode.-DHTOOL_WITH_STRICT_TESTS=ONto use warnings as errors.-DUSE_SANITIZER=Addressto use the address sanitizer.-DCODE_COVERAGEto activate code coverage.
Formatting¶
After configuring CMake as in Build and run tests, one can use the following targets:
make format
make cmake-format
formatapplies formatting to C++ code and requires ClangFormat.cmake-formatapplies formatting to CMake files and requires Python and the package cmakelang.
Formatting options are configured respectively in .clang-format and cmake-format.py.
Build Doxygen documentation¶
Similar to Build and run tests, with cmake option -DHTOOL_WITH_DOC=ON and make doc.