diff options
author | Brad King <brad.king@kitware.com> | 2019-02-13 15:16:36 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-02-13 15:17:08 (GMT) |
commit | 8914d4317a21a5673afbc72312559cc53e73eeec (patch) | |
tree | cb5609ef9ed6da7c4f819f089c266d994b6af4a3 /Source/CTest | |
parent | 264128469df1460c60099a3321b80cedcf8d2d26 (diff) | |
parent | 080a79ca4a0448043e0713b9b580c5f84b7330b3 (diff) | |
download | CMake-8914d4317a21a5673afbc72312559cc53e73eeec.zip CMake-8914d4317a21a5673afbc72312559cc53e73eeec.tar.gz CMake-8914d4317a21a5673afbc72312559cc53e73eeec.tar.bz2 |
Merge topic 'systools-stdstring2'
080a79ca4a cmSystemTools: More methods accept `std::string` params
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2952
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 12 | ||||
-rw-r--r-- | Source/CTest/cmCTestMemCheckHandler.cxx | 8 |
2 files changed, 9 insertions, 11 deletions
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 3b93422..10928e0 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -223,7 +223,7 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(std::string const& file, checkDir = fBinDir; } std::string ndc = cmSystemTools::FileExistsInParentDirectories( - ".NoDartCoverage", fFile.c_str(), checkDir.c_str()); + ".NoDartCoverage", fFile, checkDir); if (!ndc.empty()) { cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found: " << ndc << " so skip coverage of " << file @@ -254,8 +254,8 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(std::string const& file, return true; } - ndc = cmSystemTools::FileExistsInParentDirectories( - ".NoDartCoverage", fFile.c_str(), checkDir.c_str()); + ndc = cmSystemTools::FileExistsInParentDirectories(".NoDartCoverage", fFile, + checkDir); if (!ndc.empty()) { cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found: " << ndc << " so skip coverage of: " << file @@ -1058,8 +1058,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage( this->Quiet); std::vector<std::string> lines; - - cmSystemTools::Split(output.c_str(), lines); + cmsys::SystemTools::Split(output, lines); for (std::string const& line : lines) { std::string sourceFile; @@ -1435,8 +1434,7 @@ int cmCTestCoverageHandler::HandleLCovCoverage( this->Quiet); std::vector<std::string> lines; - - cmSystemTools::Split(output.c_str(), lines); + cmsys::SystemTools::Split(output, lines); for (std::string const& line : lines) { std::string sourceFile; diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 8ba59d3..954f5bb 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -725,7 +725,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckSanitizerOutput( cmsys::RegularExpression leakWarning("(Direct|Indirect) leak of .*"); int defects = 0; std::vector<std::string> lines; - cmSystemTools::Split(str.c_str(), lines); + cmsys::SystemTools::Split(str, lines); std::ostringstream ostr; log.clear(); for (std::string const& l : lines) { @@ -755,7 +755,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput( const std::string& str, std::string& log, std::vector<int>& results) { std::vector<std::string> lines; - cmSystemTools::Split(str.c_str(), lines); + cmsys::SystemTools::Split(str, lines); std::ostringstream ostr; log.clear(); @@ -798,7 +798,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput( const std::string& str, std::string& log, std::vector<int>& results) { std::vector<std::string> lines; - cmSystemTools::Split(str.c_str(), lines); + cmsys::SystemTools::Split(str, lines); bool unlimitedOutput = false; if (str.find("CTEST_FULL_OUTPUT") != std::string::npos || this->CustomMaximumFailedTestOutputSize == 0) { @@ -937,7 +937,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput( log.clear(); auto sttime = std::chrono::steady_clock::now(); std::vector<std::string> lines; - cmSystemTools::Split(str.c_str(), lines); + cmsys::SystemTools::Split(str, lines); cmCTestOptionalLog(this->CTest, DEBUG, "Start test: " << lines.size() << std::endl, this->Quiet); std::vector<std::string>::size_type cc; |