Extract a prefix variable from loop.

This commit is contained in:
Stephen Kelly 2015-01-25 15:07:27 +01:00
parent d59913f001
commit d46c4f0727
1 changed files with 2 additions and 5 deletions

View File

@ -2395,14 +2395,11 @@ void cmLocalUnixMakefileGenerator3
// each command. // each command.
std::string outputForExisting = std::string outputForExisting =
this->ConvertToOutputForExisting(tgtDir, relRetDir); this->ConvertToOutputForExisting(tgtDir, relRetDir);
std::string prefix = cd_cmd + outputForExisting + " && ";
std::vector<std::string>::iterator i = commands.begin(); std::vector<std::string>::iterator i = commands.begin();
for (; i != commands.end(); ++i) for (; i != commands.end(); ++i)
{ {
std::string cmd = cd_cmd; *i = prefix + *i;
cmd += outputForExisting;
cmd += " && ";
cmd += *i;
*i = cmd;
} }
} }
} }