This directory contains a complete working CMake example project.
This guide will walk you through building the project and generating coverage locally.
- Ensure the required tools are installed
The example expects Python 3, GCC/G++, gcov, CMake, Ninja, and lcov/genhtml to be available on your path.
- Build the example project with the provided script
$ cd example/
$ ./build.sh- Open the coverage report with a browser
If you have Firefox installed, you can simply do:
$ firefox example/cmake_project/build/coverage_report/index.html- Play around with fastcov's filtering options in build.sh
Fastcov comes with a lot of filtering options. This example uses filtering options that automatically remove system headers, "noisy" branches, and test files. Try removing the various filtering options (or adding new ones) to see how the coverage report changes!
That's it - Happy Testing!