[CMake] CTest: Glob files to include in coverage report with 0% line coverage

Andreas Schuh andreas.schuh.84 at googlemail.com
Mon Jan 23 18:18:27 EST 2012


Hi,

Setting CTEST_EXTRA_COVERAGE_GLOB in the CTestCustom.cmake file can be
used to add additional files which shall be included in the coverage
report. This is useful to ensure that files which are not covered by
any test are still reported with 0% line coverage.

I tried using absolute paths in the glob expressions, which did not
work. Only paths relative to the project's source directory worked for
me.

Now I have a scenario, where certain source files are
configured/copied to the build tree. It seems that these files are,
however, not considered by CTest. I assume the extra coverage glob
looks only for files in the source tree? Is there any way I can ensure
that uncovered files, such as .txx files, which are located in the
build tree are added to the coverage report with 0% line coverage?

Thanks,
Andreas


More information about the CMake mailing list