diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index f5376eb4b..8a0d8dc38 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -615,9 +615,25 @@ bool cmSystemTools::RunSingleCommand(std::vectorconst& command, int* retVal , const char* dir , OutputOption outputflag , double timeout ) +{ + std::vector cmd; + for(std::vector::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::vectorconst& command, + std::string* output , + int* retVal , const char* dir , + OutputOption outputflag , + double timeout ) { std::vector argv; - for(std::vector::const_iterator a = command.begin(); + for(std::vector::const_iterator a = command.begin(); a != command.end(); ++a) { argv.push_back(a->c_str()); diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 69f6381d6..95c702925 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -228,6 +228,11 @@ public: * the command to run, and each argument to the command should * be in comand[1]...command[command.size()] */ + static bool RunSingleCommand(std::vector const& command, + std::string* output = 0, + int* retVal = 0, const char* dir = 0, + OutputOption outputflag = OUTPUT_MERGE, + double timeout = 0.0); static bool RunSingleCommand(std::vector const& command, std::string* output = 0, int* retVal = 0, const char* dir = 0,