cmLocalGenerator: Implement GetFeature in terms of cmState.
This commit is contained in:
parent
7441fde34a
commit
e3078aa153
|
@ -2376,14 +2376,14 @@ const char* cmLocalGenerator::GetFeature(const std::string& feature,
|
||||||
featureName += "_";
|
featureName += "_";
|
||||||
featureName += cmSystemTools::UpperCase(config);
|
featureName += cmSystemTools::UpperCase(config);
|
||||||
}
|
}
|
||||||
cmLocalGenerator* lg = this;
|
cmState::Snapshot snp = this->StateSnapshot;
|
||||||
while(lg)
|
while(snp.IsValid())
|
||||||
{
|
{
|
||||||
if(const char* value = lg->GetMakefile()->GetProperty(featureName))
|
if(const char* value = snp.GetDirectory().GetProperty(featureName))
|
||||||
{
|
{
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
lg = lg->GetParent();
|
snp = snp.GetBuildsystemDirectoryParent();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue