summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-25 14:07:27 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-06 18:04:08 (GMT)
commitd46c4f0727acb35963dfda579cd5c9efd63aab01 (patch)
treeaa4d2b6b7ec473c3ad43971550b7b57acce34478 /Source
parentd59913f001b6eb74f9baf8bad183dc83d5e7bcd1 (diff)
downloadCMake-d46c4f0727acb35963dfda579cd5c9efd63aab01.zip
CMake-d46c4f0727acb35963dfda579cd5c9efd63aab01.tar.gz
CMake-d46c4f0727acb35963dfda579cd5c9efd63aab01.tar.bz2
Extract a prefix variable from loop.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 13c47c5..9a2186b 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -2395,14 +2395,11 @@ void cmLocalUnixMakefileGenerator3
// each command.
std::string outputForExisting =
this->ConvertToOutputForExisting(tgtDir, relRetDir);
+ std::string prefix = cd_cmd + outputForExisting + " && ";
std::vector<std::string>::iterator i = commands.begin();
for (; i != commands.end(); ++i)
{
- std::string cmd = cd_cmd;
- cmd += outputForExisting;
- cmd += " && ";
- cmd += *i;
- *i = cmd;
+ *i = prefix + *i;
}
}
}