diff options
Diffstat (limited to 'Source/cmGeneratorExpression.cxx')
-rw-r--r-- | Source/cmGeneratorExpression.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 86991c1..6979b38 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -9,6 +9,7 @@ #include "assert.h" #include "cmAlgorithms.h" #include "cmGeneratorExpressionContext.h" +#include "cmGeneratorExpressionDAGChecker.h" #include "cmGeneratorExpressionEvaluator.h" #include "cmGeneratorExpressionLexer.h" #include "cmGeneratorExpressionParser.h" @@ -385,3 +386,18 @@ void cmCompiledGeneratorExpression::GetMaxLanguageStandard( mapping = it->second; } } + +const char* cmGeneratorExpressionInterpreter::Evaluate( + const char* expression, const std::string& property) +{ + if (this->Target.empty()) { + return this->EvaluateExpression(expression); + } + + // Specify COMPILE_OPTIONS to DAGchecker, same semantic as COMPILE_FLAGS + cmGeneratorExpressionDAGChecker dagChecker( + this->Target, property == "COMPILE_FLAGS" ? "COMPILE_OPTIONS" : property, + nullptr, nullptr); + + return this->EvaluateExpression(expression, &dagChecker); +} |