From 57a69f934173eceaaf87e15074baf4e19402a687 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 25 Jul 2015 20:00:27 +0200 Subject: [PATCH] cmGlobalGenerator: Extract method to create generator objects. --- Source/cmGlobalGenerator.cxx | 10 ++++++++-- Source/cmGlobalGenerator.h | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 45ef3998c..8550d0d31 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1151,6 +1151,13 @@ void cmGlobalGenerator::Configure() } } +void cmGlobalGenerator::CreateGenerationObjects() +{ + cmDeleteAll(this->GeneratorTargets); + this->GeneratorTargets.clear(); + this->CreateGeneratorTargets(); +} + cmExportBuildFileGenerator* cmGlobalGenerator::GetExportedTargetsFile(const std::string &filename) const { @@ -1240,8 +1247,7 @@ void cmGlobalGenerator::Generate() this->LocalGenerators[i]->AddHelperCommands(); } - // Create per-target generator information. - this->CreateGeneratorTargets(); + this->CreateGenerationObjects(); this->InitGeneratorTargets(); #ifdef CMAKE_BUILD_WITH_CMAKE diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index b9a32bf7b..7d9bb4c55 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -86,6 +86,8 @@ public: */ virtual void Configure(); + void CreateGenerationObjects(); + /** * Generate the all required files for building this project/tree. This * basically creates a series of LocalGenerators for each directory and