diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2022-11-11 11:44:47 -0500 |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2022-11-11 12:29:41 -0500 |
commit | 09d7f947d68796e8fde923a47636f1c764b5a7af (patch) | |
tree | 86f7cc8f0731ae27d1b372711169ecf00f5f9870 /Source/cmGeneratorExpression.cxx | |
parent | 553794e98706800a8c792bbcd81d49522333a50f (diff) | |
download | cmake-09d7f947d68796e8fde923a47636f1c764b5a7af.tar.gz |
cmGeneratorExpression: Require cmake instance
Diffstat (limited to 'Source/cmGeneratorExpression.cxx')
-rw-r--r-- | Source/cmGeneratorExpression.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index f988e54a19..8f0db47d7f 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -13,11 +13,14 @@ #include "cmGeneratorExpressionEvaluator.h" #include "cmGeneratorExpressionLexer.h" #include "cmGeneratorExpressionParser.h" +#include "cmLocalGenerator.h" #include "cmStringAlgorithms.h" #include "cmSystemTools.h" -cmGeneratorExpression::cmGeneratorExpression(cmListFileBacktrace backtrace) - : Backtrace(std::move(backtrace)) +cmGeneratorExpression::cmGeneratorExpression(cmake& cmakeInstance, + cmListFileBacktrace backtrace) + : CMakeInstance(cmakeInstance) + , Backtrace(std::move(backtrace)) { } @@ -29,7 +32,8 @@ std::unique_ptr<cmCompiledGeneratorExpression> cmGeneratorExpression::Parse( std::string input) const { return std::unique_ptr<cmCompiledGeneratorExpression>( - new cmCompiledGeneratorExpression(this->Backtrace, std::move(input))); + new cmCompiledGeneratorExpression(this->CMakeInstance, this->Backtrace, + std::move(input))); } std::string cmGeneratorExpression::Evaluate( @@ -39,7 +43,8 @@ std::string cmGeneratorExpression::Evaluate( cmGeneratorTarget const* currentTarget, std::string const& language) { if (Find(input) != std::string::npos) { - cmCompiledGeneratorExpression cge(cmListFileBacktrace(), std::move(input)); + cmCompiledGeneratorExpression cge(*lg->GetCMakeInstance(), + cmListFileBacktrace(), std::move(input)); return cge.Evaluate(lg, config, headTarget, dagChecker, currentTarget, language); } @@ -97,7 +102,7 @@ const std::string& cmCompiledGeneratorExpression::EvaluateWithContext( } cmCompiledGeneratorExpression::cmCompiledGeneratorExpression( - cmListFileBacktrace backtrace, std::string input) + cmake& /*cmakeInstance*/, cmListFileBacktrace backtrace, std::string input) : Backtrace(std::move(backtrace)) , Input(std::move(input)) { |