CMake-codecov icon indicating copy to clipboard operation
CMake-codecov copied to clipboard

How to enable branch coverage?

Open carun opened this issue 1 year ago • 2 comments

Are there variables exposed to generate branch coverage as it appears to be disabled by default?

carun avatar Jul 12 '22 21:07 carun

It looks like the content of ~/.lcovrc is being ignored.

$ cat ~/.lcovrc
lcov_branch_coverage = 1
genhtml_legend = 1
geninfo_external = 0

which probably implies that the branch coverage is not generated by gcov. How do we get this to work?

carun avatar Jul 13 '22 00:07 carun

Apparently it is the --baseline-file option of genhtml that prevents branch coverage from being rendered in the HTML report.

carun avatar Jul 13 '22 16:07 carun