diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2019-02-11 23:11:59 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2019-02-11 23:11:59 (GMT) |
commit | 080a79ca4a0448043e0713b9b580c5f84b7330b3 (patch) | |
tree | 26534caa5ee6e522456ccdebb8dc36744611e1f6 /Source/CTest | |
parent | 8a1d25afdf92cabab88598cc9b9e5a9fb2a9493b (diff) | |
download | CMake-080a79ca4a0448043e0713b9b580c5f84b7330b3.zip CMake-080a79ca4a0448043e0713b9b580c5f84b7330b3.tar.gz CMake-080a79ca4a0448043e0713b9b580c5f84b7330b3.tar.bz2 |
cmSystemTools: More methods accept `std::string` params
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; |