summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-02-25 13:00:00 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-02-25 13:02:07 (GMT)
commit94970cd042963bedd4594d867802880b13fa9f69 (patch)
treed5e73d5905f0148b10c86649293a9c85f3b6830d /Source/cmcmd.cxx
parentac419931eed3e62cc69762a2a8b8dd76192999c0 (diff)
parent9dd255548d0a82994da71c3667f3b6668de50ffd (diff)
downloadCMake-94970cd042963bedd4594d867802880b13fa9f69.zip
CMake-94970cd042963bedd4594d867802880b13fa9f69.tar.gz
CMake-94970cd042963bedd4594d867802880b13fa9f69.tar.bz2
Merge topic 'error-consolidate'
9dd255548d cmSystemTools::Error: consolidate parameters into single std::string Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2995
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r--Source/cmcmd.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index adfce37..1139a4c 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -817,8 +817,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
if (args[1] == "chdir" && args.size() >= 4) {
std::string const& directory = args[2];
if (!cmSystemTools::FileExists(directory)) {
- cmSystemTools::Error("Directory does not exist for chdir command: ",
- args[2].c_str());
+ cmSystemTools::Error("Directory does not exist for chdir command: " +
+ args[2]);
return 1;
}
@@ -1065,12 +1065,12 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
format) != cm::cend(knownFormats);
if (!isKnown) {
- cmSystemTools::Error("Unknown -E tar --format= argument: ",
- format.c_str());
+ cmSystemTools::Error("Unknown -E tar --format= argument: " +
+ format);
return 1;
}
} else {
- cmSystemTools::Error("Unknown option to -E tar: ", arg.c_str());
+ cmSystemTools::Error("Unknown option to -E tar: " + arg);
return 1;
}
} else {
@@ -1094,8 +1094,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
++nCompress;
}
if ((format == "7zip" || format == "zip") && nCompress > 0) {
- cmSystemTools::Error("Can not use compression flags with format: ",
- format.c_str());
+ cmSystemTools::Error("Can not use compression flags with format: " +
+ format);
return 1;
}
if (nCompress > 1) {
@@ -1109,18 +1109,18 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
if (flags.find_first_of('t') != std::string::npos) {
if (!cmSystemTools::ListTar(outFile.c_str(), verbose)) {
- cmSystemTools::Error("Problem listing tar: ", outFile.c_str());
+ cmSystemTools::Error("Problem listing tar: " + outFile);
return 1;
}
} else if (flags.find_first_of('c') != std::string::npos) {
if (!cmSystemTools::CreateTar(outFile.c_str(), files, compress,
verbose, mtime, format)) {
- cmSystemTools::Error("Problem creating tar: ", outFile.c_str());
+ cmSystemTools::Error("Problem creating tar: " + outFile);
return 1;
}
} else if (flags.find_first_of('x') != std::string::npos) {
if (!cmSystemTools::ExtractTar(outFile.c_str(), verbose)) {
- cmSystemTools::Error("Problem extracting tar: ", outFile.c_str());
+ cmSystemTools::Error("Problem extracting tar: " + outFile);
return 1;
}
#ifdef WIN32