diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2022-11-11 16:44:47 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2022-11-11 17:29:41 (GMT) |
commit | 09d7f947d68796e8fde923a47636f1c764b5a7af (patch) | |
tree | 86f7cc8f0731ae27d1b372711169ecf00f5f9870 /Source/cmGeneratorExpression.h | |
parent | 553794e98706800a8c792bbcd81d49522333a50f (diff) | |
download | CMake-09d7f947d68796e8fde923a47636f1c764b5a7af.zip CMake-09d7f947d68796e8fde923a47636f1c764b5a7af.tar.gz CMake-09d7f947d68796e8fde923a47636f1c764b5a7af.tar.bz2 |
cmGeneratorExpression: Require cmake instance
Diffstat (limited to 'Source/cmGeneratorExpression.h')
-rw-r--r-- | Source/cmGeneratorExpression.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h index 188993f..e22b8ab 100644 --- a/Source/cmGeneratorExpression.h +++ b/Source/cmGeneratorExpression.h @@ -12,10 +12,11 @@ #include <vector> #include "cmListFileCache.h" +#include "cmLocalGenerator.h" +class cmake; class cmCompiledGeneratorExpression; class cmGeneratorTarget; -class cmLocalGenerator; struct cmGeneratorExpressionContext; struct cmGeneratorExpressionDAGChecker; struct cmGeneratorExpressionEvaluator; @@ -33,7 +34,8 @@ class cmGeneratorExpression { public: /** Construct. */ - cmGeneratorExpression(cmListFileBacktrace backtrace = cmListFileBacktrace()); + cmGeneratorExpression(cmake& cmakeInstance, + cmListFileBacktrace backtrace = cmListFileBacktrace()); ~cmGeneratorExpression(); cmGeneratorExpression(cmGeneratorExpression const&) = delete; @@ -82,6 +84,7 @@ public: const std::string& replacement); private: + cmake& CMakeInstance; cmListFileBacktrace Backtrace; }; @@ -152,7 +155,8 @@ private: cmGeneratorExpressionContext& context, cmGeneratorExpressionDAGChecker* dagChecker) const; - cmCompiledGeneratorExpression(cmListFileBacktrace backtrace, + cmCompiledGeneratorExpression(cmake& cmakeInstance, + cmListFileBacktrace backtrace, std::string input); friend class cmGeneratorExpression; @@ -184,7 +188,8 @@ public: std::string config, cmGeneratorTarget const* headTarget, std::string language = std::string()) - : LocalGenerator(localGenerator) + : GeneratorExpression(*localGenerator->GetCMakeInstance()) + , LocalGenerator(localGenerator) , Config(std::move(config)) , HeadTarget(headTarget) , Language(std::move(language)) |