Przeglądaj źródła

cmLocalGenerator: Implement GetFeature in terms of cmState.

Stephen Kelly 10 lat temu
rodzic
commit
e3078aa153
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      Source/cmLocalGenerator.cxx

+ 4 - 4
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;
 }