diff options
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 7 | ||||
-rw-r--r-- | Source/cmTarget.h | 2 |
4 files changed, 11 insertions, 2 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 73d24a9..a08d731 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -2105,7 +2105,7 @@ const char* cmMakefileTargetGenerator::GetFeature(const std::string& feature) //---------------------------------------------------------------------------- bool cmMakefileTargetGenerator::GetFeatureAsBool(const std::string& feature) { - return cmSystemTools::IsOn(this->GetFeature(feature)); + return this->Target->GetFeatureAsBool(feature, this->ConfigName); } //---------------------------------------------------------------------------- diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 54e398c..c3b4c75 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -105,7 +105,7 @@ const char* cmNinjaTargetGenerator::GetFeature(const std::string& feature) // TODO: Picked up from cmMakefileTargetGenerator. Refactor it. bool cmNinjaTargetGenerator::GetFeatureAsBool(const std::string& feature) { - return cmSystemTools::IsOn(this->GetFeature(feature)); + return this->Target->GetFeatureAsBool(feature, this->GetConfigName()); } // TODO: Picked up from cmMakefileTargetGenerator. Refactor it. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 86842a4..d8b7373 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -3181,6 +3181,13 @@ const char* cmTarget::GetFeature(const std::string& feature, } //---------------------------------------------------------------------------- +bool cmTarget::GetFeatureAsBool(const std::string& feature, + const std::string& config) const +{ + return cmSystemTools::IsOn(this->GetFeature(feature, config)); +} + +//---------------------------------------------------------------------------- bool cmTarget::HandleLocationPropertyPolicy(cmMakefile* context) const { if (this->IsImported()) diff --git a/Source/cmTarget.h b/Source/cmTarget.h index bee6b34..93e1b5b 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -237,6 +237,8 @@ public: const char* GetFeature(const std::string& feature, const std::string& config) const; + bool GetFeatureAsBool(const std::string& feature, + const std::string& config) const; bool IsImported() const {return this->IsImportedTarget;} |