summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.h
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2017-09-13 13:32:47 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2017-09-15 15:50:56 (GMT)
commit69fac3c3d554a285b6171648a77cdba0974cb109 (patch)
treea6ba52bdcc911077058764f065a2dbde4e557271 /Source/cmCTest.h
parentc0c5f924fe46fcf83603117689b372cb8520c4bb (diff)
downloadCMake-69fac3c3d554a285b6171648a77cdba0974cb109.zip
CMake-69fac3c3d554a285b6171648a77cdba0974cb109.tar.gz
CMake-69fac3c3d554a285b6171648a77cdba0974cb109.tar.bz2
pass arguments as vector to cmCTest::RunCommand()
The only 2 callers took care to construct a properly escaped string, but not using the documented way, and that string was passed only to be immediately split into tokens again. Start with a vector and join it only for logging, avoiding needless quotes during that.
Diffstat (limited to 'Source/cmCTest.h')
-rw-r--r--Source/cmCTest.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index 66e6a26..dbd67dc 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -245,13 +245,8 @@ public:
* exit code will be stored. If the retVal is not specified and
* the program exits with a code other than 0, then the this
* function will return false.
- *
- * If the command has spaces in the path the caller MUST call
- * cmSystemTools::ConvertToRunCommandPath on the command before passing
- * it into this function or it will not work. The command must be correctly
- * escaped for this to with spaces.
*/
- bool RunCommand(const char* command, std::string* stdOut,
+ bool RunCommand(std::vector<std::string> const& args, std::string* stdOut,
std::string* stdErr, int* retVal = nullptr,
const char* dir = nullptr, double timeout = 0.0,
Encoding encoding = cmProcessOutput::Auto);