diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-25 14:07:27 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-02-06 18:04:08 (GMT) |
commit | d46c4f0727acb35963dfda579cd5c9efd63aab01 (patch) | |
tree | aa4d2b6b7ec473c3ad43971550b7b57acce34478 /Source | |
parent | d59913f001b6eb74f9baf8bad183dc83d5e7bcd1 (diff) | |
download | CMake-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.cxx | 7 |
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; } } } |