cmLocalGenerator: Convert GetFeature recursion to loop.

This commit is contained in:
Stephen Kelly 2015-08-02 09:16:17 +02:00
parent ad0b0089ab
commit 7441fde34a
1 changed files with 8 additions and 8 deletions

View File

@ -2376,16 +2376,16 @@ const char* cmLocalGenerator::GetFeature(const std::string& feature,
featureName += "_"; featureName += "_";
featureName += cmSystemTools::UpperCase(config); featureName += cmSystemTools::UpperCase(config);
} }
if(const char* value = this->Makefile->GetProperty(featureName)) cmLocalGenerator* lg = this;
while(lg)
{ {
return value; if(const char* value = lg->GetMakefile()->GetProperty(featureName))
{
return value;
}
lg = lg->GetParent();
} }
cmLocalGenerator* parent = this->GetParent(); return 0;
if(!parent)
{
return 0;
}
return parent->GetFeature(feature, config);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------