[CMake] percent of coverage

Dave Milter davemilter at gmail.com
Sat Mar 29 15:35:11 EDT 2008


Hello.

I try to create simple project with cmake, and then using ctest to
calculate test coverage.

Project consists of
foo.c
foo.h
main.c
test_foo.c

main application consists of "foo" and "main",
test consists of "test_foo" and "foo".

After I run:
ctest -VV -D ExperimentalStart -D ExperimentalTest -D
ExperimentalCoverage -D ExperimentalSubmit

I get percennt of coverage for test_foo and foo, but not for main,
from one hand the reason is clear to me,  "main" module do not take
part into running, but from other hand all tests used to test source
code of "main application", and the final code to measure test
coverage for "main application",

can I force ctest to show "0 %" coverage for "main" module, and to use
its number of lines to calculate final result?

Any hints how can I do it?


More information about the CMake mailing list