An example project using CMake's FetchContent
module with ApprovalTests.
In addition also uses Meson build framework to
build the same example.
A fairly recent version of CMake is required, at least 3.14. Git is also required for CMake to fetch other dependencies. Meson 0.50.0 have been used to test the meson build. This project defaults to using the C++11 standard and a compliant compiler is recommended.
A standard CMake install should build this project. Please note that the Ninja generator is not supported by the ApprovalTests Catch2 integration. The test will fail if Ninja is used as the build generator. Otherwise, the following example code should build for any single-configuration generator.
mkdir build
cmake ..
cmake --build .
A multi-configuration generator must specify the configuration of the build. The following command specifies the Release configuration.
cmake --build . --config Release
You could use the meson_build.sh
script or run the individual commands.
meson build_meson -Db_coverage=true
ninja -C build_meson
ninja -C build_meson test
ninja -C build_meson coverage-html
The tests can be run by simply invoking CTest in the build directory.
ctest
This project is not currently meant to be installed.
This project is powered by open source projects š„°
This project is licensed under the MIT license.