cmake-scripts
cmake-scripts copied to clipboard
Support for custom code coverage analysis tools
I have another request.
Besides lcov we're also using gcovr for some of our projects and we have our own script that generates the coverage report. For those projects I'm still using your code-coverage.cmake module as basis w.r.t. the compiler settings and I just create a custom cmake tarket to produce the coverage report analog to ccov-capture-${target_code_coverage_COVERAGE_TARGET_NAME}.
Everything works fine, but I'd like to suppress the implicitly created ccov-* targets to keep the list of available targets clean. Can you think of a simple way to support that? Perhaps by offering a cmake option like the following?
option(
DISABLE_COVERAGE_TOOLS
"If ON then no targets are created for the built-in supported coverage tools."
OFF)