summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx27
1 files changed, 27 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index f8d1bee..5ed53d0 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2520,6 +2520,33 @@ void cmLocalGenerator::AppendFeatureOptions(
}
//----------------------------------------------------------------------------
+const char* cmLocalGenerator::GetFeature(const std::string& feature,
+ const std::string& config)
+{
+ // TODO: Define accumulation policy for features (prepend, append, replace).
+ // Currently we always replace.
+ if(!config.empty())
+ {
+ std::string featureConfig = feature;
+ featureConfig += "_";
+ featureConfig += cmSystemTools::UpperCase(config);
+ if(const char* value = this->Makefile->GetProperty(featureConfig))
+ {
+ return value;
+ }
+ }
+ if(const char* value = this->Makefile->GetProperty(feature))
+ {
+ return value;
+ }
+ if(cmLocalGenerator* parent = this->GetParent())
+ {
+ return parent->GetFeature(feature, config);
+ }
+ return 0;
+}
+
+//----------------------------------------------------------------------------
std::string
cmLocalGenerator::ConstructComment(cmCustomCommandGenerator const& ccg,
const char* default_comment)