summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionNode.cxx
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-06-22 21:11:56 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2020-07-01 11:58:58 (GMT)
commitdc94b0249e1f4057c153bbd6deeea13ad85987e6 (patch)
tree6af9ec6ec603f5f60f5a2222ed9be25c08eda21b /Source/cmGeneratorExpressionNode.cxx
parent8975c2a55b2d274b4de46c482c5873c52ba3a358 (diff)
downloadCMake-dc94b0249e1f4057c153bbd6deeea13ad85987e6.zip
CMake-dc94b0249e1f4057c153bbd6deeea13ad85987e6.tar.gz
CMake-dc94b0249e1f4057c153bbd6deeea13ad85987e6.tar.bz2
cmStandardLevelResolver: Added to handle standard level queries
Refactored out of cmMakefile
Diffstat (limited to 'Source/cmGeneratorExpressionNode.cxx')
-rw-r--r--Source/cmGeneratorExpressionNode.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index b712b71..4adc6a2 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -37,6 +37,7 @@
#include "cmPolicies.h"
#include "cmProperty.h"
#include "cmRange.h"
+#include "cmStandardLevelResolver.h"
#include "cmState.h"
#include "cmStateSnapshot.h"
#include "cmStateTypes.h"
@@ -1707,11 +1708,11 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode
static LangMap availableFeatures;
LangMap testedFeatures;
-
+ cmStandardLevelResolver standardResolver(context->LG->GetMakefile());
for (std::string const& p : parameters) {
std::string error;
std::string lang;
- if (!context->LG->GetMakefile()->CompileFeatureKnown(
+ if (!standardResolver.CompileFeatureKnown(
context->HeadTarget->Target->GetName(), p, lang, &error)) {
reportError(context, content->GetOriginalExpression(), error);
return std::string();
@@ -1720,7 +1721,7 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode
if (availableFeatures.find(lang) == availableFeatures.end()) {
const char* featuresKnown =
- context->LG->GetMakefile()->CompileFeaturesAvailable(lang, &error);
+ standardResolver.CompileFeaturesAvailable(lang, &error);
if (!featuresKnown) {
reportError(context, content->GetOriginalExpression(), error);
return std::string();
@@ -1745,8 +1746,8 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode
// All features known for the language are always available.
continue;
}
- if (!context->LG->GetMakefile()->HaveStandardAvailable(
- target, lit.first, context->Config, it)) {
+ if (!standardResolver.HaveStandardAvailable(target, lit.first,
+ context->Config, it)) {
if (evalLL) {
cmProp l = target->GetLanguageStandard(lit.first, context->Config);
if (!l) {