summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionNode.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-07-02 12:39:13 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-07-02 12:39:26 (GMT)
commit29d2d4805fbad653761ee92bbd0850e1c20de37b (patch)
treed46964c3607384029f46826ce2c2ae01f75bee69 /Source/cmGeneratorExpressionNode.cxx
parentb516ada836217417fb325b4e14f7a2ef55564b58 (diff)
parentdc94b0249e1f4057c153bbd6deeea13ad85987e6 (diff)
downloadCMake-29d2d4805fbad653761ee92bbd0850e1c20de37b.zip
CMake-29d2d4805fbad653761ee92bbd0850e1c20de37b.tar.gz
CMake-29d2d4805fbad653761ee92bbd0850e1c20de37b.tar.bz2
Merge topic 'refactor_cmmakefile_language_standards_methods'
dc94b0249e cmStandardLevelResolver: Added to handle standard level queries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4932
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) {