diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorExpression.cxx | 17 | ||||
-rw-r--r-- | Source/cmGeneratorExpressionContext.cxx | 20 | ||||
-rw-r--r-- | Source/cmGeneratorExpressionContext.h | 8 |
3 files changed, 29 insertions, 16 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index a4990dc093..2d795cbb6c 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -72,19 +72,10 @@ const char *cmCompiledGeneratorExpression::Evaluate( cmGeneratorExpressionDAGChecker *dagChecker, std::string const& language) const { - cmGeneratorExpressionContext context; - context.Makefile = mf; - context.Config = config; - context.Quiet = quiet; - context.HadError = false; - context.HadContextSensitiveCondition = false; - context.HadHeadSensitiveCondition = false; - context.SourceSensitiveTargets.clear(); - context.HeadTarget = headTarget; - context.EvaluateForBuildsystem = this->EvaluateForBuildsystem; - context.CurrentTarget = currentTarget ? currentTarget : headTarget; - context.Backtrace = this->Backtrace; - context.Language = language; + cmGeneratorExpressionContext context(mf, config, quiet, headTarget, + currentTarget ? currentTarget : headTarget, + this->EvaluateForBuildsystem, + this->Backtrace, language); return this->EvaluateWithContext(context, dagChecker); } diff --git a/Source/cmGeneratorExpressionContext.cxx b/Source/cmGeneratorExpressionContext.cxx index 4ed8ff2dec..947015e9b7 100644 --- a/Source/cmGeneratorExpressionContext.cxx +++ b/Source/cmGeneratorExpressionContext.cxx @@ -12,7 +12,23 @@ #include "cmGeneratorExpressionContext.h" -cmGeneratorExpressionContext::cmGeneratorExpressionContext(); - : Backtrace(NULL) +cmGeneratorExpressionContext::cmGeneratorExpressionContext( + cmMakefile* mf, std::string const& config, + bool quiet, cmTarget const* headTarget, + cmTarget const* currentTarget, + bool evaluateForBuildsystem, + cmListFileBacktrace const& backtrace, + std::string const& language) + : Backtrace(backtrace), + Makefile(mf), + Config(config), + Language(language), + HeadTarget(headTarget), + CurrentTarget(currentTarget), + Quiet(quiet), + HadError(false), + HadContextSensitiveCondition(false), + HadHeadSensitiveCondition(false), + EvaluateForBuildsystem(evaluateForBuildsystem) { } diff --git a/Source/cmGeneratorExpressionContext.h b/Source/cmGeneratorExpressionContext.h index ce6f376aae..ed83509711 100644 --- a/Source/cmGeneratorExpressionContext.h +++ b/Source/cmGeneratorExpressionContext.h @@ -23,7 +23,13 @@ class cmTarget; //---------------------------------------------------------------------------- struct cmGeneratorExpressionContext { - cmGeneratorExpressionContext(); + cmGeneratorExpressionContext(cmMakefile* mf, std::string const& config, + bool quiet, cmTarget const* headTarget, + cmTarget const* currentTarget, + bool evaluateForBuildsystem, + cmListFileBacktrace const& backtrace, + std::string const& language); + cmListFileBacktrace Backtrace; std::set<cmTarget*> DependTargets; |