summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-20 17:21:54 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-09-20 17:21:58 (GMT)
commit95df03a1d44d48b5407dd0ddc9e618ce2f17762b (patch)
treefa58eb95326e5518725afecd0a681e6f2d251a88 /Source
parent7f8999dfc6fd6b432a178a2bb8d346287e4f9109 (diff)
parent062776e75b4b0340b178d03bd15ef263d5cf8db1 (diff)
downloadCMake-95df03a1d44d48b5407dd0ddc9e618ce2f17762b.zip
CMake-95df03a1d44d48b5407dd0ddc9e618ce2f17762b.tar.gz
CMake-95df03a1d44d48b5407dd0ddc9e618ce2f17762b.tar.bz2
Merge topic 'CTest-cov-string'
062776e7 CTest: pass std::string to cmCTestCoverageHandler::ShouldIDoCoverage() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1290
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx17
-rw-r--r--Source/CTest/cmCTestCoverageHandler.h4
2 files changed, 10 insertions, 11 deletions
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 70f011a..56eeceb 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -185,9 +185,9 @@ void cmCTestCoverageHandler::EndCoverageLogXML(cmXMLWriter& xml)
this->CTest->EndXML(xml);
}
-bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file,
- const char* srcDir,
- const char* binDir)
+bool cmCTestCoverageHandler::ShouldIDoCoverage(std::string const& file,
+ std::string const& srcDir,
+ std::string const& binDir)
{
if (this->IsFilteredOut(file)) {
return false;
@@ -435,8 +435,8 @@ int cmCTestCoverageHandler::ProcessHandler()
}
const std::string fullFileName = file.first;
- bool shouldIDoCoverage = this->ShouldIDoCoverage(
- fullFileName.c_str(), sourceDir.c_str(), binaryDir.c_str());
+ bool shouldIDoCoverage =
+ this->ShouldIDoCoverage(fullFileName, sourceDir, binaryDir);
if (!shouldIDoCoverage) {
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
".NoDartCoverage found, so skip coverage check for: "
@@ -2018,8 +2018,8 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
file += sourceFile;
}
file = cmSystemTools::CollapseFullPath(file);
- bool shouldIDoCoverage = this->ShouldIDoCoverage(
- file.c_str(), cont->SourceDir.c_str(), cont->BinaryDir.c_str());
+ bool shouldIDoCoverage =
+ this->ShouldIDoCoverage(file, cont->SourceDir, cont->BinaryDir);
if (!shouldIDoCoverage) {
cmCTestOptionalLog(
this->CTest, HANDLER_VERBOSE_OUTPUT,
@@ -2320,8 +2320,7 @@ std::set<std::string> cmCTestCoverageHandler::FindUncoveredFiles(
gl.FindFiles(glob);
std::vector<std::string> files = gl.GetFiles();
for (std::string const& f : files) {
- if (this->ShouldIDoCoverage(f.c_str(), cont->SourceDir.c_str(),
- cont->BinaryDir.c_str())) {
+ if (this->ShouldIDoCoverage(f, cont->SourceDir, cont->BinaryDir)) {
extraMatches.insert(this->CTest->GetShortPathToFile(f.c_str()));
}
}
diff --git a/Source/CTest/cmCTestCoverageHandler.h b/Source/CTest/cmCTestCoverageHandler.h
index 99ac5df..6492fe9 100644
--- a/Source/CTest/cmCTestCoverageHandler.h
+++ b/Source/CTest/cmCTestCoverageHandler.h
@@ -57,8 +57,8 @@ public:
void SetLabelFilter(std::set<std::string> const& labels);
private:
- bool ShouldIDoCoverage(const char* file, const char* srcDir,
- const char* binDir);
+ bool ShouldIDoCoverage(std::string const& file, std::string const& srcDir,
+ std::string const& binDir);
void CleanCoverageLogFiles(std::ostream& log);
bool StartCoverageLogFile(cmGeneratedFileStream& ostr, int logFileCount);
void EndCoverageLogFile(cmGeneratedFileStream& ostr, int logFileCount);