[CMake] CTest Coverage looking in the wrong spot for source files
Tyler Lacy
tylerlacy at gmail.com
Wed Aug 11 17:52:18 EDT 2010
I am using Ctest to do testing and coverage for my code. The directory is
set up like so:
SourceDir/
subdir1/
foo.cpp
foo.gcda
foo.gcno
foo.h
subsub/
foo2.cpp
foo2.gcda
foo2.gcno
subdir2/
bar.cpp
bar.gcda
bar.gcno
subdir3/
script.cmake
build-Linux/
Testing/
CoverageInfo/
The script.cmake is what is used to run the test and coverage. When the
script is ran it begins to do coverage and it reads both the gcno and gcda
files fine(I think). A bunch of *.gcda##*.gcov files are made and placed in
the CoverageInfo folder. Then it gets the following error for each .cpp
file:
Process file : /SourceDir/subdir3/build-Linux/Testing/CoverageInfo/foo.cpp
Cannot find file:
/SourceDir/subdir3/build-Linux/Testing/CoverageInfo/foo.cpp
It tries to find the .cpp file in the CoverageInfo directory when the
foo.cpp is actually in a different directory. I am unsure on how to tell
ctest to look for the file in the correct directory.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100811/69d9cfb4/attachment-0001.htm>
More information about the CMake
mailing list