diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-08-12 17:17:35 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2021-08-12 17:17:35 (GMT) |
commit | 361b1ea4c76fab3f22e99de6bbd926a8956714fa (patch) | |
tree | 23c89abf6d485093b23e1b030ad95b3afedb4847 /Source | |
parent | 3fc3b43933d0b486aa4eb5d63fc257475feff348 (diff) | |
download | CMake-361b1ea4c76fab3f22e99de6bbd926a8956714fa.zip CMake-361b1ea4c76fab3f22e99de6bbd926a8956714fa.tar.gz CMake-361b1ea4c76fab3f22e99de6bbd926a8956714fa.tar.bz2 |
Refactor: cmStandardLevelResolver::ComputeFeaturesAvailable returns cmProp
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorExpressionNode.cxx | 2 | ||||
-rw-r--r-- | Source/cmStandardLevelResolver.cxx | 6 | ||||
-rw-r--r-- | Source/cmStandardLevelResolver.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 217ebe5..3e90ead 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1777,7 +1777,7 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode testedFeatures[lang].push_back(p); if (availableFeatures.find(lang) == availableFeatures.end()) { - const char* featuresKnown = + cmProp featuresKnown = standardResolver.CompileFeaturesAvailable(lang, &error); if (!featuresKnown) { reportError(context, content->GetOriginalExpression(), error); diff --git a/Source/cmStandardLevelResolver.cxx b/Source/cmStandardLevelResolver.cxx index da36ed6..499317d 100644 --- a/Source/cmStandardLevelResolver.cxx +++ b/Source/cmStandardLevelResolver.cxx @@ -393,7 +393,7 @@ bool cmStandardLevelResolver::CheckCompileFeaturesAvailable( return true; } - const char* features = this->CompileFeaturesAvailable(lang, error); + cmProp features = this->CompileFeaturesAvailable(lang, error); if (!features) { return false; } @@ -471,7 +471,7 @@ bool cmStandardLevelResolver::CompileFeatureKnown( return false; } -const char* cmStandardLevelResolver::CompileFeaturesAvailable( +cmProp cmStandardLevelResolver::CompileFeaturesAvailable( const std::string& lang, std::string* error) const { if (!this->Makefile->GetGlobalGenerator()->GetLanguageEnabled(lang)) { @@ -513,7 +513,7 @@ const char* cmStandardLevelResolver::CompileFeaturesAvailable( } return nullptr; } - return cmToCStr(featuresKnown); + return featuresKnown; } bool cmStandardLevelResolver::GetNewRequiredStandard( diff --git a/Source/cmStandardLevelResolver.h b/Source/cmStandardLevelResolver.h index d84fbcb..c01a3b1 100644 --- a/Source/cmStandardLevelResolver.h +++ b/Source/cmStandardLevelResolver.h @@ -30,8 +30,8 @@ public: const std::string& feature, std::string& lang, std::string* error) const; - const char* CompileFeaturesAvailable(const std::string& lang, - std::string* error) const; + cmProp CompileFeaturesAvailable(const std::string& lang, + std::string* error) const; bool GetNewRequiredStandard(const std::string& targetName, const std::string& feature, |