diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-18 14:59:03 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-02-06 18:04:08 (GMT) |
commit | d59913f001b6eb74f9baf8bad183dc83d5e7bcd1 (patch) | |
tree | 85ba417bbde67fae1030a3102f4f29071bd15571 | |
parent | 3f3db74413fc6b0afe4aa484c0ada2d5271ef0ba (diff) | |
download | CMake-d59913f001b6eb74f9baf8bad183dc83d5e7bcd1.zip CMake-d59913f001b6eb74f9baf8bad183dc83d5e7bcd1.tar.gz CMake-d59913f001b6eb74f9baf8bad183dc83d5e7bcd1.tar.bz2 |
Take computation out of loop.
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index fbf2140..13c47c5 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -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; |