summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 7aa1202..afe5324 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3311,6 +3311,31 @@ bool cmMakefile::GetPropertyAsBool(const char* prop)
return cmSystemTools::IsOn(this->GetProperty(prop));
}
+//----------------------------------------------------------------------------
+const char* cmMakefile::GetFeature(const char* feature, const char* config)
+{
+ // TODO: Define accumulation policy for features (prepend, append, replace).
+ // Currently we always replace.
+ if(config && *config)
+ {
+ std::string featureConfig = feature;
+ featureConfig += "_";
+ featureConfig += cmSystemTools::UpperCase(config);
+ if(const char* value = this->GetProperty(featureConfig.c_str()))
+ {
+ return value;
+ }
+ }
+ if(const char* value = this->GetProperty(feature))
+ {
+ return value;
+ }
+ if(cmLocalGenerator* parent = this->LocalGenerator->GetParent())
+ {
+ return parent->GetMakefile()->GetFeature(feature, config);
+ }
+ return 0;
+}
cmTarget* cmMakefile::FindTarget(const char* name)
{