cmake-scripts icon indicating copy to clipboard operation
cmake-scripts copied to clipboard

Question: code coverage on all targets

Open peter-moran opened this issue 4 years ago • 1 comments

Is it possible to have code coverage reported on all targets? For example, if I run an executable with coverage I've noticed that only the compilation units in that executable get included in the coverage report. Instead, I'd like all file in my project to have 0% coverage by default, and then running the executable updates that baseline.

Is this possible and I am doing something wrong, or is this not supported?

peter-moran avatar May 18 '21 18:05 peter-moran

Basically this step https://wiki.documentfoundation.org/Development/Lcov#Run_initial.2Fbaseline_lcov

create an lcov "baseline" before running any tests. The result is a coverage data file that contains zero coverage for every instrumented line of the project

peter-moran avatar May 18 '21 19:05 peter-moran