summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-12-09 13:52:23 (GMT)
committerBrad King <brad.king@kitware.com>2016-12-09 13:59:17 (GMT)
commitc58a5198e5eb8878ad111be2eafcfef75e94b54b (patch)
tree6b23f836bb033b1248b3f6947376d32d40fd846b /Source/cmMakefileTargetGenerator.cxx
parent9a2048f1ea6687530e209992c3f5eafcbc02b2a9 (diff)
downloadCMake-c58a5198e5eb8878ad111be2eafcfef75e94b54b.zip
CMake-c58a5198e5eb8878ad111be2eafcfef75e94b54b.tar.gz
CMake-c58a5198e5eb8878ad111be2eafcfef75e94b54b.tar.bz2
Makefile: Restore RULE_LAUNCH_COMPILE generation on compilation rules
Refactoring in commit 425cd167 (cmLocalGenerator: Remove the launcher from RuleVariables, 2016-10-09) accidentally broke Makefile generator handling of `RULE_LAUNCH_COMPILE`. Responsibility moved from `ExpandRuleVariables` to its call sites, and the Makefile generator call site for compilations was not properly updated. Fix it now.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index cbfe850..e3cde5e 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -545,7 +545,6 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
}
}
cmRulePlaceholderExpander::RuleVariables vars;
- vars.RuleLauncher = "RULE_LAUNCH_COMPILE";
vars.CMTargetName = this->GeneratorTarget->GetName().c_str();
vars.CMTargetType =
cmState::GetTargetTypeName(this->GeneratorTarget->GetType());
@@ -664,9 +663,20 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
}
}
+ std::string launcher;
+ {
+ const char* val = this->LocalGenerator->GetRuleLauncher(
+ this->GeneratorTarget, "RULE_LAUNCH_COMPILE");
+ if (val && *val) {
+ launcher = val;
+ launcher += " ";
+ }
+ }
+
// Expand placeholders in the commands.
for (std::vector<std::string>::iterator i = compileCommands.begin();
i != compileCommands.end(); ++i) {
+ *i = launcher + *i;
rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i,
vars);
}