diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-10-09 08:34:47 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-10-15 09:25:12 (GMT) |
commit | 425cd1670fdd40b752af71e5f28952ae4fcec4ac (patch) | |
tree | 5b5538f305e6636f94fa24000b8fb0874b35df43 /Source/cmMakefileExecutableTargetGenerator.cxx | |
parent | 0d818632978a450f1afaf687c867e62e885457f7 (diff) | |
download | CMake-425cd1670fdd40b752af71e5f28952ae4fcec4ac.zip CMake-425cd1670fdd40b752af71e5f28952ae4fcec4ac.tar.gz CMake-425cd1670fdd40b752af71e5f28952ae4fcec4ac.tar.bz2 |
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.
Diffstat (limited to 'Source/cmMakefileExecutableTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileExecutableTargetGenerator.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index ed34ce6..da29b60 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -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 = ""; |