summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-21 12:57:20 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-01-21 12:57:33 (GMT)
commitc7428e1729239264af84cb9ecb6f05f0b1e04e84 (patch)
treebf237aa6ab7120e8740fe4cbe7eaaf6f93e1d297 /Source/cmCTest.cxx
parent177b5fb61b6d1fc64c70ea3bf65652ccad690dd5 (diff)
parent25caf7bafeb18d9394eb2d13686970c68e9ad88c (diff)
downloadCMake-c7428e1729239264af84cb9ecb6f05f0b1e04e84.zip
CMake-c7428e1729239264af84cb9ecb6f05f0b1e04e84.tar.gz
CMake-c7428e1729239264af84cb9ecb6f05f0b1e04e84.tar.bz2
Merge topic 'read-list-file'
25caf7bafe cmMakefile::ReadListFile() accepts std::string argument Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2821
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 7966a0d..5f71520 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -640,7 +640,7 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
" Reading ctest configuration file: " << fname
<< std::endl,
command->ShouldBeQuiet());
- bool readit = mf->ReadDependentFile(fname.c_str());
+ bool readit = mf->ReadDependentFile(fname);
if (!readit) {
std::string m = "Could not find include file: ";
m += fname;
@@ -2472,8 +2472,7 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
bool erroroc = cmSystemTools::GetErrorOccuredFlag();
cmSystemTools::ResetErrorOccuredFlag();
- if (!mf->ReadListFile(fname.c_str()) ||
- cmSystemTools::GetErrorOccuredFlag()) {
+ if (!mf->ReadListFile(fname) || cmSystemTools::GetErrorOccuredFlag()) {
cmCTestLog(this, ERROR_MESSAGE,
"Problem reading custom configuration: " << fname
<< std::endl);
@@ -2492,15 +2491,13 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
gl.RecurseOn();
gl.FindFiles(rexpr);
std::vector<std::string>& files = gl.GetFiles();
- std::vector<std::string>::iterator fileIt;
- for (fileIt = files.begin(); fileIt != files.end(); ++fileIt) {
+ for (const std::string& file : files) {
cmCTestLog(this, DEBUG,
- "* Read custom CTest configuration file: " << *fileIt
+ "* Read custom CTest configuration file: " << file
<< std::endl);
- if (!mf->ReadListFile(fileIt->c_str()) ||
- cmSystemTools::GetErrorOccuredFlag()) {
+ if (!mf->ReadListFile(file) || cmSystemTools::GetErrorOccuredFlag()) {
cmCTestLog(this, ERROR_MESSAGE,
- "Problem reading custom configuration: " << *fileIt
+ "Problem reading custom configuration: " << file
<< std::endl);
}
}