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.
This commit is contained in:
Marco Craveiro 2011-01-12 22:43:24 +00:00 committed by David Cole
parent 7258b0674c
commit 6e02a3b2bf
1 changed files with 1 additions and 1 deletions

View File

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