diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 3235bfdce..55a5225e7 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -2038,8 +2038,12 @@ std::set cmCTestCoverageHandler::FindUncoveredFiles( for(std::vector::iterator f = files.begin(); f != files.end(); ++f) { - extraMatches.insert(this->CTest->GetShortPathToFile( - f->c_str())); + if(this->ShouldIDoCoverage(f->c_str(), + cont->SourceDir.c_str(), cont->BinaryDir.c_str())) + { + extraMatches.insert(this->CTest->GetShortPathToFile( + f->c_str())); + } } }