mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
cmSystemTools: Add RunSingleCommand overload for std::vector<std::string>
This commit is contained in:
@@ -615,9 +615,25 @@ bool cmSystemTools::RunSingleCommand(std::vector<cmStdString>const& command,
|
||||
int* retVal , const char* dir ,
|
||||
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());
|
||||
|
||||
Reference in New Issue
Block a user