mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 20:19:53 +00:00
Take computation out of loop.
This commit is contained in:
parent
3f3db74413
commit
d59913f001
@ -2393,11 +2393,13 @@ void cmLocalUnixMakefileGenerator3
|
||||
// On UNIX we must construct a single shell command to change
|
||||
// directory and build because make resets the directory between
|
||||
// each command.
|
||||
std::string outputForExisting =
|
||||
this->ConvertToOutputForExisting(tgtDir, relRetDir);
|
||||
std::vector<std::string>::iterator i = commands.begin();
|
||||
for (; i != commands.end(); ++i)
|
||||
{
|
||||
std::string cmd = cd_cmd;
|
||||
cmd += this->ConvertToOutputForExisting(tgtDir, relRetDir);
|
||||
cmd += outputForExisting;
|
||||
cmd += " && ";
|
||||
cmd += *i;
|
||||
*i = cmd;
|
||||
|
Loading…
Reference in New Issue
Block a user