diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-18 14:40:56 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-20 21:58:49 (GMT) |
commit | 04b6bb167636ccf2fe565239a44249366ee1e452 (patch) | |
tree | 754d7cd880c859884b91b84865818edf26f49202 /Source | |
parent | 400e3d19fcebf7d6e9551d585d60754bd937c28c (diff) | |
download | CMake-04b6bb167636ccf2fe565239a44249366ee1e452.zip CMake-04b6bb167636ccf2fe565239a44249366ee1e452.tar.gz CMake-04b6bb167636ccf2fe565239a44249366ee1e452.tar.bz2 |
cmLocalGenerator: Simplify semantic of adding generator targets.
Don't store on the global generator as a side effect. Update clients to adapt.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalVisualStudio8Generator.cxx | 1 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.cxx | 1 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmLocalGenerator.cxx | 1 | ||||
-rw-r--r-- | Source/cmQtAutoGeneratorInitializer.cxx | 1 |
5 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 0c41964..61b19cf 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 9af5b35..91ca9a3 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 ea1b1a0..3838ebc 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 1a4516c..833ffbf 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 386d430..16b8942 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() |