From 791337f18124d745dd08a8f141cc258656dc052b Mon Sep 17 00:00:00 2001 From: Marc Chevrier Date: Mon, 9 Aug 2021 17:28:31 +0200 Subject: Refactor: cmCommonTargetGenerator::GetFeature returns cmProp --- Source/cmCommonTargetGenerator.cxx | 6 +++--- Source/cmCommonTargetGenerator.h | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 7c2e20c..59e4141 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -39,10 +39,10 @@ std::vector const& cmCommonTargetGenerator::GetConfigNames() const return this->ConfigNames; } -const char* cmCommonTargetGenerator::GetFeature(const std::string& feature, - const std::string& config) +cmProp cmCommonTargetGenerator::GetFeature(const std::string& feature, + const std::string& config) { - return this->GeneratorTarget->GetFeature(feature, config)->c_str(); + return this->GeneratorTarget->GetFeature(feature, config); } void cmCommonTargetGenerator::AddModuleDefinitionFlag( diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h index e1a4f8b..463a445 100644 --- a/Source/cmCommonTargetGenerator.h +++ b/Source/cmCommonTargetGenerator.h @@ -8,6 +8,8 @@ #include #include +#include "cmProperty.h" + class cmGeneratorTarget; class cmGlobalCommonGenerator; class cmLinkLineComputer; @@ -28,8 +30,7 @@ public: protected: // Feature query methods. - const char* GetFeature(const std::string& feature, - const std::string& config); + cmProp GetFeature(const std::string& feature, const std::string& config); // Helper to add flag for windows .def file. void AddModuleDefinitionFlag(cmLinkLineComputer* linkLineComputer, -- cgit v0.12