summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-18 14:59:03 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-06 18:04:08 (GMT)
commitd59913f001b6eb74f9baf8bad183dc83d5e7bcd1 (patch)
tree85ba417bbde67fae1030a3102f4f29071bd15571
parent3f3db74413fc6b0afe4aa484c0ada2d5271ef0ba (diff)
downloadCMake-d59913f001b6eb74f9baf8bad183dc83d5e7bcd1.zip
CMake-d59913f001b6eb74f9baf8bad183dc83d5e7bcd1.tar.gz
CMake-d59913f001b6eb74f9baf8bad183dc83d5e7bcd1.tar.bz2
Take computation out of loop.
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx4
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;