diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-10-09 08:34:50 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-10-15 09:25:12 (GMT) |
commit | b59b6dd9d27de7839c7b23a3094db33298038896 (patch) | |
tree | 2b36fbb568918ef952f0f59beaa15363f09b400f /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | bdddd4234e977f65ee7df8adcd3888706dfd0dda (diff) | |
download | CMake-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/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 6906cbf..f30414c 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -14,6 +14,7 @@ #include "cmMakefile.h" #include "cmMakefileTargetGenerator.h" #include "cmOutputConverter.h" +#include "cmRulePlaceholderExpander.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmSystemTools.h" @@ -945,6 +946,9 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( *content << dir; } + CM_AUTO_PTR<cmRulePlaceholderExpander> rulePlaceholderExpander( + this->CreateRulePlaceholderExpander()); + // Add each command line to the set of commands. std::vector<std::string> commands1; std::string currentBinDir = this->GetCurrentBinaryDirectory(); @@ -988,7 +992,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( if (val && *val) { // Expand rules in the empty string. It may insert the launcher and // perform replacements. - RuleVariables vars; + cmRulePlaceholderExpander::RuleVariables vars; vars.CMTargetName = target->GetName().c_str(); vars.CMTargetType = cmState::GetTargetTypeName(target->GetType()); std::string output; @@ -1006,7 +1010,7 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( launcher = val; launcher += " "; - this->ExpandRuleVariables(this, launcher, vars); + rulePlaceholderExpander->ExpandRuleVariables(this, launcher, vars); if (!launcher.empty()) { launcher += " "; } |