summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2019-02-20 18:50:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2019-02-20 19:53:39 (GMT)
commit4e315e9449735fc0f246c8cc838613693e849296 (patch)
tree73e74046ff415ed019c23a3433b015f229813c6d /Source/cmSystemTools.cxx
parentb76b83efd37a439e22d1d92af3b98c30e8f9ba97 (diff)
downloadCMake-4e315e9449735fc0f246c8cc838613693e849296.zip
CMake-4e315e9449735fc0f246c8cc838613693e849296.tar.gz
CMake-4e315e9449735fc0f246c8cc838613693e849296.tar.bz2
cmSystemTools: More functions accept `std::string` params
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index f0e8077..28a6564 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -571,13 +571,14 @@ std::vector<std::string> cmSystemTools::HandleResponseFile(
return arg_full;
}
-std::vector<std::string> cmSystemTools::ParseArguments(const char* command)
+std::vector<std::string> cmSystemTools::ParseArguments(const std::string& cmd)
{
std::vector<std::string> args;
std::string arg;
bool win_path = false;
+ const char* command = cmd.c_str();
if (command[0] && command[1] &&
((command[0] != '/' && command[1] == ':' && command[2] == '\\') ||
(command[0] == '\"' && command[1] != '/' && command[2] == ':' &&
@@ -878,8 +879,7 @@ bool cmSystemTools::RunSingleCommand(const std::string& command,
outputflag = OUTPUT_NONE;
}
- std::vector<std::string> args =
- cmSystemTools::ParseArguments(command.c_str());
+ std::vector<std::string> args = cmSystemTools::ParseArguments(command);
if (args.empty()) {
return false;
@@ -1411,7 +1411,7 @@ void cmSystemTools::ConvertToOutputSlashes(std::string& path)
#endif
}
-std::string cmSystemTools::ConvertToRunCommandPath(const char* path)
+std::string cmSystemTools::ConvertToRunCommandPath(const std::string& path)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
return cmSystemTools::ConvertToWindowsOutputPath(path);
@@ -1614,7 +1614,7 @@ void cmSystemTools::EnableVSConsoleOutput()
#endif
}
-bool cmSystemTools::IsPathToFramework(const char* path)
+bool cmSystemTools::IsPathToFramework(const std::string& path)
{
return (cmSystemTools::FileIsFullPath(path) &&
cmHasLiteralSuffix(path, ".framework"));
@@ -3005,7 +3005,7 @@ bool cmSystemTools::CheckRPath(std::string const& file,
#endif
}
-bool cmSystemTools::RepeatedRemoveDirectory(const char* dir)
+bool cmSystemTools::RepeatedRemoveDirectory(const std::string& dir)
{
// Windows sometimes locks files temporarily so try a few times.
for (int i = 0; i < 10; ++i) {