summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileExecutableTargetGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-10-09 08:34:50 (GMT)
committerStephen Kelly <steveire@gmail.com>2016-10-15 09:25:12 (GMT)
commitb59b6dd9d27de7839c7b23a3094db33298038896 (patch)
tree2b36fbb568918ef952f0f59beaa15363f09b400f /Source/cmMakefileExecutableTargetGenerator.cxx
parentbdddd4234e977f65ee7df8adcd3888706dfd0dda (diff)
downloadCMake-b59b6dd9d27de7839c7b23a3094db33298038896.zip
CMake-b59b6dd9d27de7839c7b23a3094db33298038896.tar.gz
CMake-b59b6dd9d27de7839c7b23a3094db33298038896.tar.bz2
cmRulePlaceholderExpander: Port clients to direct-use
Add a factory function to cmLocalGenerator so that variableMappings can be provided from it, and so that Ninja can always have a hard-coded TargetImpLib.
Diffstat (limited to 'Source/cmMakefileExecutableTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index fafff01..7eca0a8 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -11,6 +11,7 @@
#include "cmMakefile.h"
#include "cmOSXBundleGenerator.h"
#include "cmOutputConverter.h"
+#include "cmRulePlaceholderExpander.h"
#include "cmSystemTools.h"
#include "cmake.h"
@@ -331,7 +332,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
std::string manifests = this->GetManifests();
- cmLocalGenerator::RuleVariables vars;
+ cmRulePlaceholderExpander::RuleVariables vars;
vars.CMTargetName = this->GeneratorTarget->GetName().c_str();
vars.CMTargetType =
cmState::GetTargetTypeName(this->GeneratorTarget->GetType());
@@ -393,15 +394,17 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
launcher += " ";
}
+ CM_AUTO_PTR<cmRulePlaceholderExpander> rulePlaceholderExpander(
+ this->LocalGenerator->CreateRulePlaceholderExpander());
+
// Expand placeholders in the commands.
- this->LocalGenerator->TargetImplib = targetOutPathImport;
+ rulePlaceholderExpander->SetTargetImpLib(targetOutPathImport);
for (std::vector<std::string>::iterator i = real_link_commands.begin();
i != real_link_commands.end(); ++i) {
*i = launcher + *i;
- this->LocalGenerator->ExpandRuleVariables(this->LocalGenerator, *i,
- vars);
+ rulePlaceholderExpander->ExpandRuleVariables(this->LocalGenerator, *i,
+ vars);
}
- this->LocalGenerator->TargetImplib = "";
// Restore path conversion to normal shells.
this->LocalGenerator->SetLinkScriptShell(false);