diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-07-28 16:57:29 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-07-30 06:28:30 (GMT) |
commit | ff1019bfac1380681989242fa904c2d9fe13fd38 (patch) | |
tree | 103e9fa62eb37f85c64a4f09eb8215f20283aa0f | |
parent | aa2407d84d8bcd983b3df294032831bbd54cf25d (diff) | |
download | CMake-ff1019bfac1380681989242fa904c2d9fe13fd38.zip CMake-ff1019bfac1380681989242fa904c2d9fe13fd38.tar.gz CMake-ff1019bfac1380681989242fa904c2d9fe13fd38.tar.bz2 |
cmGlobalGenerator: Move generation object creation to Compute().
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio8Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 7 |
4 files changed, 12 insertions, 3 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index dcbc558..b79576c 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1228,13 +1228,13 @@ bool cmGlobalGenerator::Compute() } this->FinalizeTargetCompileInfo(); + this->CreateGenerationObjects(); + return true; } void cmGlobalGenerator::Generate() { - this->CreateGenerationObjects(); - #ifdef CMAKE_BUILD_WITH_CMAKE // Iterate through all targets and set up automoc for those which have // the AUTOMOC, AUTOUIC or AUTORCC property set diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index f3cf36e..16e3f9b 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -254,6 +254,8 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget() mf->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET, false, no_working_directory, no_depends, noCommandLines); + cmGeneratorTarget* gt = new cmGeneratorTarget(tgt, lg); + mf->AddGeneratorTarget(tgt, gt); // Organize in the "predefined targets" folder: // diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index d6973aa..a147eb3 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -85,6 +85,8 @@ void cmGlobalVisualStudioGenerator::Generate() AddUtilityCommand("ALL_BUILD", true, no_working_dir, no_depends, no_commands, false, "Build all projects"); + cmGeneratorTarget* gt = new cmGeneratorTarget(allBuild, gen[0]); + allBuild->GetMakefile()->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 91b8186..ffa4c5d 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -452,6 +452,8 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root, cmTarget* allbuild = mf->AddUtilityCommand("ALL_BUILD", true, no_depends, no_working_directory, "echo", "Build all projects"); + cmGeneratorTarget* allBuildGt = new cmGeneratorTarget(allbuild, root); + mf->AddGeneratorTarget(allbuild, allBuildGt); // Refer to the main build configuration file for easy editing. std::string listfile = mf->GetCurrentSourceDirectory(); @@ -480,9 +482,12 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root, std::string file = this->ConvertToRelativeForMake( this->CurrentReRunCMakeMakefile.c_str()); cmSystemTools::ReplaceString(file, "\\ ", " "); - mf->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET, true, no_depends, + cmTarget* check = mf->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET, + true, no_depends, no_working_directory, "make", "-f", file.c_str()); + cmGeneratorTarget* checkGt = new cmGeneratorTarget(check, root); + mf->AddGeneratorTarget(check, checkGt); } // now make the allbuild depend on all the non-utility targets |