summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx18
1 files changed, 6 insertions, 12 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index b172478..9bf0ccd 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -260,12 +260,9 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkRule(bool useResponseFile)
rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(),
*i, vars);
}
- {
- // If there is no ranlib the command will be ":". Skip it.
- std::vector<std::string>::iterator newEnd = std::remove_if(
- linkCmds.begin(), linkCmds.end(), cmNinjaRemoveNoOpCommands());
- linkCmds.erase(newEnd, linkCmds.end());
- }
+
+ // If there is no ranlib the command will be ":". Skip it.
+ cmEraseIf(linkCmds, cmNinjaRemoveNoOpCommands());
std::string linkCmd =
this->GetLocalGenerator()->BuildCommandLine(linkCmds);
@@ -388,12 +385,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile)
rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(),
*i, vars);
}
- {
- // If there is no ranlib the command will be ":". Skip it.
- std::vector<std::string>::iterator newEnd = std::remove_if(
- linkCmds.begin(), linkCmds.end(), cmNinjaRemoveNoOpCommands());
- linkCmds.erase(newEnd, linkCmds.end());
- }
+
+ // If there is no ranlib the command will be ":". Skip it.
+ cmEraseIf(linkCmds, cmNinjaRemoveNoOpCommands());
linkCmds.insert(linkCmds.begin(), "$PRE_LINK");
linkCmds.push_back("$POST_BUILD");