mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 22:30:07 -05:00
cmLocalGenerator: Remove the launcher from RuleVariables
This one is not like the others as it doesn't participate in substitutions. Keep ExpandRuleVariables doing only one thing and make callers responsible for inserting a launcher prefix, simplifying the code all-around. Remove now-obsolete InsertRuleLauncher method.
This commit is contained in:
@@ -332,7 +332,6 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
||||
std::string manifests = this->GetManifests();
|
||||
|
||||
cmLocalGenerator::RuleVariables vars;
|
||||
vars.RuleLauncher = "RULE_LAUNCH_LINK";
|
||||
vars.CMTarget = this->GeneratorTarget;
|
||||
vars.Language = linkLanguage.c_str();
|
||||
vars.Objects = buildObjs.c_str();
|
||||
@@ -383,10 +382,20 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
||||
real_link_commands.push_back(cmakeCommand);
|
||||
}
|
||||
|
||||
std::string launcher;
|
||||
|
||||
const char* val = this->LocalGenerator->GetRuleLauncher(
|
||||
this->GeneratorTarget, "RULE_LAUNCH_LINK");
|
||||
if (val && *val) {
|
||||
launcher = val;
|
||||
launcher += " ";
|
||||
}
|
||||
|
||||
// Expand placeholders in the commands.
|
||||
this->LocalGenerator->TargetImplib = targetOutPathImport;
|
||||
for (std::vector<std::string>::iterator i = real_link_commands.begin();
|
||||
i != real_link_commands.end(); ++i) {
|
||||
*i = launcher + *i;
|
||||
this->LocalGenerator->ExpandRuleVariables(*i, vars);
|
||||
}
|
||||
this->LocalGenerator->TargetImplib = "";
|
||||
|
||||
Reference in New Issue
Block a user