summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.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/cmGeneratorTarget.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/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 992682f..b290919 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -43,6 +43,7 @@
#include "cmSourceFile.h"
#include "cmSourceFileLocation.h"
#include "cmSourceFileLocationKind.h"
+#include "cmStandardLevelResolver.h"
#include "cmState.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
@@ -4464,11 +4465,12 @@ void cmGeneratorTarget::ComputeTargetManifest(const std::string& config) const
bool cmGeneratorTarget::ComputeCompileFeatures(std::string const& config) const
{
// Compute the language standard based on the compile features.
+ cmStandardLevelResolver standardResolver(this->Makefile);
std::vector<BT<std::string>> features = this->GetCompileFeatures(config);
for (BT<std::string> const& f : features) {
std::string lang;
- if (!this->Makefile->CompileFeatureKnown(this->Target->GetName(), f.Value,
- lang, nullptr)) {
+ if (!standardResolver.CompileFeatureKnown(this->Target->GetName(), f.Value,
+ lang, nullptr)) {
return false;
}
@@ -4476,7 +4478,7 @@ bool cmGeneratorTarget::ComputeCompileFeatures(std::string const& config) const
cmProp currentLanguageStandard = this->GetLanguageStandard(lang, config);
std::string newRequiredStandard;
- if (!this->Makefile->GetNewRequiredStandard(
+ if (!standardResolver.GetNewRequiredStandard(
this->Target->GetName(), f.Value, currentLanguageStandard,
newRequiredStandard)) {
return false;