diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2019-02-20 16:15:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2019-02-20 16:18:11 (GMT) |
commit | 9dd255548d0a82994da71c3667f3b6668de50ffd (patch) | |
tree | 13cba689d3ebea9a5910b7237fb102ac65e49364 /Source/cmcmd.cxx | |
parent | b76b83efd37a439e22d1d92af3b98c30e8f9ba97 (diff) | |
download | CMake-9dd255548d0a82994da71c3667f3b6668de50ffd.zip CMake-9dd255548d0a82994da71c3667f3b6668de50ffd.tar.gz CMake-9dd255548d0a82994da71c3667f3b6668de50ffd.tar.bz2 |
cmSystemTools::Error: consolidate parameters into single std::string
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 20 |
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 |