mirror of
https://github.com/reactos/CMake.git
synced 2024-12-16 08:07:29 +00:00
cmLocalGenerator: Convert GetFeature recursion to loop.
This commit is contained in:
parent
ad0b0089ab
commit
7441fde34a
@ -2376,16 +2376,16 @@ const char* cmLocalGenerator::GetFeature(const std::string& feature,
|
||||
featureName += "_";
|
||||
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();
|
||||
if(!parent)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return parent->GetFeature(feature, config);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user