Browse Source

cmGlobalGenerator: Don't fetch the cache manager in a loop.

It doesn't change from Makefile to Makefile.
Stephen Kelly 10 years ago
parent
commit
510562e3e7
1 changed files with 1 additions and 2 deletions
  1. 1 2
      Source/cmGlobalGenerator.cxx

+ 1 - 2
Source/cmGlobalGenerator.cxx

@@ -1537,10 +1537,9 @@ void cmGlobalGenerator::CheckLocalGenerators()
   std::map<std::string, std::string> notFoundMap;
 //  std::set<std::string> notFoundMap;
   // after it is all done do a ConfigureFinalPass
-  cmCacheManager* manager = 0;
+  cmCacheManager* manager = this->GetCMakeInstance()->GetCacheManager();
   for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
     {
-    manager = this->LocalGenerators[i]->GetMakefile()->GetCacheManager();
     this->LocalGenerators[i]->ConfigureFinalPass();
     cmTargets &targets =
       this->LocalGenerators[i]->GetMakefile()->GetTargets();