Browse Source

CTest: Use the gcov --preserve-paths flag (#11717)

To avoid name clashes.

Before this commit, name clashes can occur when invoking gcov on a
project that uses the same file name in different directories. The
--preserve-paths flag ensures all file names have a complete path,
avoiding name clashes.
Marco Craveiro 14 years ago
parent
commit
6e02a3b2bf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/CTest/cmCTestCoverageHandler.cxx

+ 1 - 1
Source/CTest/cmCTestCoverageHandler.cxx

@@ -825,7 +825,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
     // Call gcov to get coverage data for this *.gcda file:
     //
     std::string fileDir = cmSystemTools::GetFilenamePath(it->c_str());
-    std::string command = "\"" + gcovCommand + "\" -l -o \"" + fileDir
+    std::string command = "\"" + gcovCommand + "\" -l -p -o \"" + fileDir
       + "\" \"" + *it + "\"";
 
     cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, command.c_str()