summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-02-25 12:59:51 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-02-25 12:59:59 (GMT)
commit0476d16589cf62bc631acc2f50ff2a0525b6d641 (patch)
tree217b45e0071c8f00983eebf5f9df52646dd571c8 /Source/cmSystemTools.cxx
parentae309d757dfb4f654360f5412b86243e54cc387a (diff)
parent4e315e9449735fc0f246c8cc838613693e849296 (diff)
downloadCMake-0476d16589cf62bc631acc2f50ff2a0525b6d641.zip
CMake-0476d16589cf62bc631acc2f50ff2a0525b6d641.tar.gz
CMake-0476d16589cf62bc631acc2f50ff2a0525b6d641.tar.bz2
Merge topic 'systools-stdstring3'
4e315e9449 cmSystemTools: More functions accept `std::string` params Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2999
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) {