diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 0c419641e..61b19cfcc 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -257,6 +257,7 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget() cmGeneratorTarget* gt = new cmGeneratorTarget(tgt, lg); lg->AddGeneratorTarget(tgt, gt); + this->AddGeneratorTarget(tgt, gt); // Organize in the "predefined targets" folder: // diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 9af5b3536..91ca9a31d 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -88,6 +88,7 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets() cmGeneratorTarget* gt = new cmGeneratorTarget(allBuild, gen[0]); gen[0]->AddGeneratorTarget(allBuild, gt); + this->AddGeneratorTarget(allBuild, gt); #if 0 // Can't activate this code because we want ALL_BUILD diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index ea1b1a086..3838ebc04 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -460,6 +460,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root, cmGeneratorTarget* allBuildGt = new cmGeneratorTarget(allbuild, root); root->AddGeneratorTarget(allbuild, allBuildGt); + root->GetGlobalGenerator()->AddGeneratorTarget(allbuild, allBuildGt); // Refer to the main build configuration file for easy editing. std::string listfile = root->GetCurrentSourceDirectory(); @@ -495,6 +496,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root, cmGeneratorTarget* checkGt = new cmGeneratorTarget(check, root); root->AddGeneratorTarget(check, checkGt); + root->GetGlobalGenerator()->AddGeneratorTarget(check, checkGt); } // now make the allbuild depend on all the non-utility targets diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 1a4516cf8..833ffbf1b 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -451,7 +451,6 @@ void cmLocalGenerator::GenerateInstallRules() void cmLocalGenerator::AddGeneratorTarget(cmTarget* t, cmGeneratorTarget* gt) { this->GeneratorTargets[t] = gt; - this->GetGlobalGenerator()->AddGeneratorTarget(t, gt); } //---------------------------------------------------------------------------- diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 386d43002..16b8942b7 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -896,6 +896,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget( cmGeneratorTarget* gt = new cmGeneratorTarget(autogenTarget, lg); lg->AddGeneratorTarget(autogenTarget, gt); + lg->GetGlobalGenerator()->AddGeneratorTarget(autogenTarget, gt); // Set target folder const char* autogenFolder = makefile->GetState()