[CMake] Enabling code coverage on clang dashboard
Sean McBride
sean at rogue-research.com
Mon Dec 19 18:51:22 EST 2011
Hi all,
Now that clang supports code coverage, I thought I'd enable it on my CMake dashboards, but I'm a little confused as to how.
I've read this, but it's only partly helpful:
<http://www.cmake.org/Wiki/CTest:Coverage>
Building cmake itself, if I use only cmake (not ctest nor cdash) then things compile and link if I use these settings:
CMAKE_CXX_FLAGS -fprofile-arcs -ftest-coverage
CMAKE_C_FLAGS -fprofile-arcs -ftest-coverage
CMAKE_EXE_LINKER_FLAGS -I/Developer/usr/lib -lprofile_rt
CMAKE_MODULE_LINKER_FLAGS -I/Developer/usr/lib -lprofile_rt
CMAKE_SHARED_LINKER_FLAGS -I/Developer/usr/lib -lprofile_rt
Is this right? I'm especially uncertain about the linker flags.
Also, this seems to leave gunk in the git repo:
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# Tests/CommandLineTest/CMakeFiles/
# Tests/CustomCommandWorkingDirectory/CMakeFiles/
# Tests/Java/CMakeFiles/
Is that a bug? Does it happen with gcc?
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the CMake
mailing list