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.
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake