Browse Source

BUG: Make sure targets of type GLOBAL_TARGET have a makefile set.

Brad King 19 years ago
parent
commit
ed6791c898
1 changed files with 3 additions and 2 deletions
  1. 3 2
      Source/cmGlobalGenerator.cxx

+ 3 - 2
Source/cmGlobalGenerator.cxx

@@ -716,12 +716,13 @@ void cmGlobalGenerator::Generate()
     }
   for (i = 0; i < this->LocalGenerators.size(); ++i)
     {
-    cmTargets* targets = 
-      &(this->LocalGenerators[i]->GetMakefile()->GetTargets());
+    cmMakefile* mf = this->LocalGenerators[i]->GetMakefile();
+    cmTargets* targets = &(mf->GetTargets());
     cmTargets::iterator tit;
     for ( tit = globalTargets.begin(); tit != globalTargets.end(); ++ tit )
       {
       (*targets)[tit->first] = tit->second;
+      (*targets)[tit->first].SetMakefile(mf);
       }
     }