[CMake] Problem getting coverage to work with gcov
Iman Brouwer
iman.brouwer at gmail.com
Wed Oct 29 15:02:58 EDT 2008
make
make test
ctest -T Coverage
Produces beautiful output on smaller projects I created but when I use it
with our main large software, it doesn't produce the coverage files:
~/MainProject/trunk_build_coverage $ctest -VV -T Coverage
UpdateCTestConfiguration from
:/home/brouwer/MainProject/trunk_build_coverage/DartConfiguration.tcl
Parse Config
file:/home/brouwer/MainProject/trunk_build_coverage/DartConfiguration.tcl
Site: haptic1
Build name: Linux-c++
Start processing tests
UpdateCTestConfiguration from
:/home/brouwer/MainProject/trunk_build_coverage/DartConfiguration.tcl
Parse Config
file:/home/brouwer/MainProject/trunk_build_coverage/DartConfiguration.tcl
Performing coverage
COVFILE environment variable not found, not running bullseye
Cannot find any GCov coverage files.
Cannot find any Python Trace.py coverage files.
Cannot find any coverage files. Ignoring Coverage request.
If anybody has any pointers on how to proceed, I would be very grateful. I
spend two days on getting it to work, but i'm out of ideas what to try next.
Unfortunately the small projects I created to test coverage all work, only
the larger more complicated project results in the above error... General
testing and testing with valgrind work in this larger project, it's just the
coverage test that fails to run.
Thanks,
Iman Brouwer
P.S. Below are some essential parts of my configuration:
In have the following line in my main CMakeLists.txt:
INCLUDE(CTest)
and the following variables are in my CMakeCache.txt (flags taken from the
cmake wiki )
//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
CMAKE_BUILD_TYPE:STRING=Debug
//Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g -O0 -Wall -W -Wshadow -Wunused-variable
-Wunused-parameter -Wunused-function -Wunused -Wno-system-headers
-Wno-deprecated -Woverloaded-virtual -Wwrite-strings -fprofile-arcs
-ftest-coverage
//Flags used by the compiler during debug builds.
CMAKE_C_FLAGS_DEBUG:STRING=-g -O0 -Wall -W -fprofile-arcs -ftest-coverage
//Flags used by the linker during debug builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=-fprofile-arcs -ftest-coverage
//Path to the coverage program that CTest uses for performing coverage
// inspection
COVERAGE_COMMAND:FILEPATH=/usr/bin/gcov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081029/6a676526/attachment.htm>
More information about the CMake
mailing list