summaryrefslogtreecommitdiffstats
path: root/Source/cmCustomCommandGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-09-12 13:11:25 (GMT)
committerBrad King <brad.king@kitware.com>2012-09-18 21:03:08 (GMT)
commit91011bd217726f73e362b10d77a6638977d6a781 (patch)
tree5feed05d259d3c4b8b152e51a1d567a0e26a508a /Source/cmCustomCommandGenerator.cxx
parentf1eacf0e07759b57d100dbf5d83c70e4028bcb54 (diff)
downloadCMake-91011bd217726f73e362b10d77a6638977d6a781.zip
CMake-91011bd217726f73e362b10d77a6638977d6a781.tar.gz
CMake-91011bd217726f73e362b10d77a6638977d6a781.tar.bz2
cmGeneratorExpression: Port users to two-stage processing
Removing the Process() API and removing the parameters from the constructor will allow cmGeneratorExpressions to be cached and evaluated with multiple configs for example, such as when evaluating target properties. This requires the creation of a new compiled representation of cmGeneratorExpression. The cmListFileBacktrace remains in the constructor so that we can record where a particular generator expression appeared in the CMakeLists file.
Diffstat (limited to 'Source/cmCustomCommandGenerator.cxx')
-rw-r--r--Source/cmCustomCommandGenerator.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx
index a650129..07df7d5 100644
--- a/Source/cmCustomCommandGenerator.cxx
+++ b/Source/cmCustomCommandGenerator.cxx
@@ -21,7 +21,7 @@ cmCustomCommandGenerator::cmCustomCommandGenerator(
cmCustomCommand const& cc, const char* config, cmMakefile* mf):
CC(cc), Config(config), Makefile(mf), LG(mf->GetLocalGenerator()),
OldStyle(cc.GetEscapeOldStyle()), MakeVars(cc.GetEscapeAllowMakeVars()),
- GE(new cmGeneratorExpression(mf, config, cc.GetBacktrace()))
+ GE(new cmGeneratorExpression(cc.GetBacktrace()))
{
}
@@ -47,7 +47,7 @@ std::string cmCustomCommandGenerator::GetCommand(unsigned int c) const
{
return target->GetLocation(this->Config);
}
- return this->GE->Process(argv0);
+ return this->GE->Parse(argv0).Evaluate(this->Makefile, this->Config);
}
//----------------------------------------------------------------------------
@@ -58,7 +58,8 @@ cmCustomCommandGenerator
cmCustomCommandLine const& commandLine = this->CC.GetCommandLines()[c];
for(unsigned int j=1;j < commandLine.size(); ++j)
{
- std::string arg = this->GE->Process(commandLine[j]);
+ std::string arg = this->GE->Parse(commandLine[j]).Evaluate(this->Makefile,
+ this->Config);
cmd += " ";
if(this->OldStyle)
{