...
C/C++test ships with an extension for CMake that allows you to integrate C/C++test's code coverage analysis directly into your CMake project. The extension automatically modifies your compiler/linker command lines to use the cpptestcc
coverage utility tool when building your project. As a result, after you run the instrumented application or execute functional or unit tests, a C/C++test coverage log file (.clog) is created. The coverage log file can then be used to generate a complete code coverage report.
...
Option Name | Description | Default |
---|---|---|
CPPTEST_COMPILER_ID | Specifies the compiler configuration that matches your compiler. | gcc_9-64 |
CPPTEST_COVERAGE_TYPE_FLAGS | Specifies the coverage type. See Command Line Reference for cpptestcc for available options. | -optimized-line-coverage |
CPPTEST_COVERAGE_WORKSPACE | Specifies the path to the workspace for the coverage utility tool where C/C++test's coverage data files are stored by default. | <CMAKE_BINARY_DIR>/cpptest-coverage/<CMAKE_PROJECT_NAME> |
CPPTEST_COVERAGE_LOG_FILE | Specifies the name and location of the C/C++test coverage log file (.clog). | <CPPTEST_COVERAGE_WORKSPACE>/<CMAKE_PROJECT_NAME>.clog |
CPPTEST_CPPTESTCC_OPTS | Specifies the options for the cpptestcc coverage utilitytool. |
In addition, you may want to review:
...