[CMake] ctest and gcov and cdash

Leif Walsh leif.walsh at gmail.com
Wed May 2 18:01:21 EDT 2012


Apologies. In checking again, these flags were not being passed during the compile phase. I'll go fix that and bump this if it still doesn't work. 

Sent from my iPhone

On May 2, 2012, at 17:32, Leif Walsh <leif.walsh at gmail.com> wrote:

> Hi,
> 
> I can't find any documentation that describes gcov integration with ctest in depth, though there seems to be a fair amount of integration with it, as well as with cdash.
> 
> As far as I can tell, you're supposed to compile with -fprofile-arcs -ftest-coverage -lgcov and then run all your tests somehow that they generate .gcda and/or .gcno files, which ctest -D ExperimentalCoverage and the like can then pick up, parse, and do something useful with.  My problem is with step 2, running the tests (I think).
> 
> I compile with those flags in CMAKE_C_FLAGS and CMAKE_EXE_LINKER_FLAGS and everything seems to go ok.  I then run the tests with ctest.  I don't see any gcov files get generated anywhere, and I don't know what else to try.
> 
> Can anyone help, with words or links?
> 
> -- 
> Cheers,
> Leif
> 


More information about the CMake mailing list