From e3078aa15328439e239b2beb4085dc644ec465ec Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 2 Aug 2015 09:18:37 +0200 Subject: [PATCH] cmLocalGenerator: Implement GetFeature in terms of cmState. --- Source/cmLocalGenerator.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 8e12eb6d0d..c2d1a7d896 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2376,14 +2376,14 @@ const char* cmLocalGenerator::GetFeature(const std::string& feature, featureName += "_"; featureName += cmSystemTools::UpperCase(config); } - cmLocalGenerator* lg = this; - while(lg) + cmState::Snapshot snp = this->StateSnapshot; + while(snp.IsValid()) { - if(const char* value = lg->GetMakefile()->GetProperty(featureName)) + if(const char* value = snp.GetDirectory().GetProperty(featureName)) { return value; } - lg = lg->GetParent(); + snp = snp.GetBuildsystemDirectoryParent(); } return 0; }