cmLocalGenerator: Simplify GetFeature implementation.
This commit is contained in:
parent
314c9ae33b
commit
ad0b0089ab
|
@ -2368,19 +2368,15 @@ void cmLocalGenerator::AppendFeatureOptions(
|
||||||
const char* cmLocalGenerator::GetFeature(const std::string& feature,
|
const char* cmLocalGenerator::GetFeature(const std::string& feature,
|
||||||
const std::string& config)
|
const std::string& config)
|
||||||
{
|
{
|
||||||
|
std::string featureName = feature;
|
||||||
// TODO: Define accumulation policy for features (prepend, append, replace).
|
// TODO: Define accumulation policy for features (prepend, append, replace).
|
||||||
// Currently we always replace.
|
// Currently we always replace.
|
||||||
if(!config.empty())
|
if(!config.empty())
|
||||||
{
|
{
|
||||||
std::string featureConfig = feature;
|
featureName += "_";
|
||||||
featureConfig += "_";
|
featureName += cmSystemTools::UpperCase(config);
|
||||||
featureConfig += cmSystemTools::UpperCase(config);
|
|
||||||
if(const char* value = this->Makefile->GetProperty(featureConfig))
|
|
||||||
{
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(const char* value = this->Makefile->GetProperty(feature))
|
if(const char* value = this->Makefile->GetProperty(featureName))
|
||||||
{
|
{
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue