소스 검색

cmGlobalGenerator: Implement FillProjectMap in terms of cmState.

Stephen Kelly 10 년 전
부모
커밋
637c56b4e0
1개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. 6 5
      Source/cmGlobalGenerator.cxx

+ 6 - 5
Source/cmGlobalGenerator.cxx

@@ -2102,18 +2102,19 @@ void cmGlobalGenerator::FillProjectMap()
   for(i = 0; i < this->LocalGenerators.size(); ++i)
     {
     // for each local generator add all projects
-    cmLocalGenerator *lg = this->LocalGenerators[i];
+    cmState::Snapshot snp = this->LocalGenerators[i]->GetStateSnapshot();
     std::string name;
     do
       {
-      if (name != lg->GetMakefile()->GetProjectName())
+      std::string snpProjName = snp.GetProjectName();
+      if (name != snpProjName)
         {
-        name = lg->GetMakefile()->GetProjectName();
+        name = snpProjName;
         this->ProjectMap[name].push_back(this->LocalGenerators[i]);
         }
-      lg = lg->GetParent();
+      snp = snp.GetBuildsystemDirectoryParent();
       }
-    while (lg);
+    while (snp.IsValid());
     }
 }