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:
parent
7258b0674c
commit
6e02a3b2bf
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue