diff options
author | Brad King <brad.king@kitware.com> | 2013-11-15 18:30:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-11-15 19:40:55 (GMT) |
commit | ee6e4ac841d8094b59cd0a48c61d7ca3b68c68c2 (patch) | |
tree | 80e2f1de5cd9711726ab9951a32d1e16e6984a76 /Source/cmSystemTools.cxx | |
parent | 2d072069e2ef44780c214c847285df8ed8e70bba (diff) | |
download | CMake-ee6e4ac841d8094b59cd0a48c61d7ca3b68c68c2.zip CMake-ee6e4ac841d8094b59cd0a48c61d7ca3b68c68c2.tar.gz CMake-ee6e4ac841d8094b59cd0a48c61d7ca3b68c68c2.tar.bz2 |
cmSystemTools: Add RunSingleCommand overload for std::vector<std::string>
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index f5376eb..8a0d8dc 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -616,8 +616,24 @@ bool cmSystemTools::RunSingleCommand(std::vector<cmStdString>const& command, OutputOption outputflag , double timeout ) { + std::vector<std::string> cmd; + for(std::vector<cmStdString>::const_iterator i = command.begin(); + i != command.end(); ++i) + { + cmd.push_back(*i); + } + return cmSystemTools::RunSingleCommand(cmd, output, retVal, dir, + outputflag, timeout); +} + +bool cmSystemTools::RunSingleCommand(std::vector<std::string>const& command, + std::string* output , + int* retVal , const char* dir , + OutputOption outputflag , + double timeout ) +{ std::vector<const char*> argv; - for(std::vector<cmStdString>::const_iterator a = command.begin(); + for(std::vector<std::string>::const_iterator a = command.begin(); a != command.end(); ++a) { argv.push_back(a->c_str()); |