I am using Ctest to do testing and coverage for my code. The directory is set up like so:<br><br>SourceDir/<br> subdir1/<br> foo.cpp<br> foo.gcda<br> foo.gcno<br> foo.h<br> subsub/<br>
foo2.cpp<br> foo2.gcda<br> foo2.gcno<br> subdir2/<br> bar.cpp<br> bar.gcda<br> bar.gcno<br> subdir3/<br> script.cmake<br> build-Linux/<br>
Testing/<br> CoverageInfo/<br><br>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:<br>
<br>Process file : /SourceDir/subdir3/build-Linux/Testing/CoverageInfo/foo.cpp<br>Cannot find file: /SourceDir/subdir3/build-Linux/Testing/CoverageInfo/foo.cpp<br><br>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.<br>
<br> <br>