summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2019-02-20 16:15:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2019-02-20 16:18:11 (GMT)
commit9dd255548d0a82994da71c3667f3b6668de50ffd (patch)
tree13cba689d3ebea9a5910b7237fb102ac65e49364 /Source/cmake.cxx
parentb76b83efd37a439e22d1d92af3b98c30e8f9ba97 (diff)
downloadCMake-9dd255548d0a82994da71c3667f3b6668de50ffd.zip
CMake-9dd255548d0a82994da71c3667f3b6668de50ffd.tar.gz
CMake-9dd255548d0a82994da71c3667f3b6668de50ffd.tar.bz2
cmSystemTools::Error: consolidate parameters into single std::string
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index ab783c7..f6f0a95 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -788,13 +788,13 @@ void cmake::SetArgs(const std::vector<std::string>& args)
}
cmGlobalGenerator* gen = this->CreateGlobalGenerator(value);
if (!gen) {
- const char* kdevError = nullptr;
+ std::string kdevError;
if (value.find("KDevelop3", 0) != std::string::npos) {
kdevError = "\nThe KDevelop3 generator is not supported anymore.";
}
- cmSystemTools::Error("Could not create named generator ",
- value.c_str(), kdevError);
+ cmSystemTools::Error("Could not create named generator " + value +
+ kdevError);
this->PrintGeneratorList();
} else {
this->SetGlobalGenerator(gen);
@@ -938,8 +938,8 @@ int cmake::AddCMakePaths()
cmSystemTools::Error(
"Could not find CMAKE_ROOT !!!\n"
"CMake has most likely not been installed correctly.\n"
- "Modules directory not found in\n",
- cmSystemTools::GetCMakeRoot().c_str());
+ "Modules directory not found in\n" +
+ cmSystemTools::GetCMakeRoot());
return 0;
}
this->AddCacheEntry("CMAKE_ROOT", cmSystemTools::GetCMakeRoot().c_str(),
@@ -2016,8 +2016,8 @@ void cmake::UpdateConversionPathTable()
if (tablepath) {
cmsys::ifstream table(tablepath->c_str());
if (!table) {
- cmSystemTools::Error("CMAKE_PATH_TRANSLATION_FILE set to ",
- tablepath->c_str(), ". CMake can not open file.");
+ cmSystemTools::Error("CMAKE_PATH_TRANSLATION_FILE set to " + *tablepath +
+ ". CMake can not open file.");
cmSystemTools::ReportLastSystemError("CMake can not open file.");
} else {
std::string a, b;
@@ -2325,8 +2325,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& args)
}
cmGlobalGenerator* gen = this->CreateGlobalGenerator(value);
if (!gen) {
- cmSystemTools::Error("Could not create named generator ",
- value.c_str());
+ cmSystemTools::Error("Could not create named generator " + value);
this->PrintGeneratorList();
} else {
this->SetGlobalGenerator(gen);
@@ -2473,7 +2472,7 @@ static bool cmakeCheckStampFile(const std::string& stampName, bool verbose)
return true;
}
cmSystemTools::RemoveFile(stampTemp);
- cmSystemTools::Error("Cannot restore timestamp ", stampName.c_str());
+ cmSystemTools::Error("Cannot restore timestamp " + stampName);
return false;
}