mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-28 18:09:31 -06:00
cmGlobalGenerator: Move generation object creation to Compute().
This commit is contained in:
@@ -1228,13 +1228,13 @@ bool cmGlobalGenerator::Compute()
|
|||||||
}
|
}
|
||||||
this->FinalizeTargetCompileInfo();
|
this->FinalizeTargetCompileInfo();
|
||||||
|
|
||||||
|
this->CreateGenerationObjects();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmGlobalGenerator::Generate()
|
void cmGlobalGenerator::Generate()
|
||||||
{
|
{
|
||||||
this->CreateGenerationObjects();
|
|
||||||
|
|
||||||
#ifdef CMAKE_BUILD_WITH_CMAKE
|
#ifdef CMAKE_BUILD_WITH_CMAKE
|
||||||
// Iterate through all targets and set up automoc for those which have
|
// Iterate through all targets and set up automoc for those which have
|
||||||
// the AUTOMOC, AUTOUIC or AUTORCC property set
|
// the AUTOMOC, AUTOUIC or AUTORCC property set
|
||||||
|
|||||||
@@ -254,6 +254,8 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
|
|||||||
mf->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET, false,
|
mf->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET, false,
|
||||||
no_working_directory, no_depends,
|
no_working_directory, no_depends,
|
||||||
noCommandLines);
|
noCommandLines);
|
||||||
|
cmGeneratorTarget* gt = new cmGeneratorTarget(tgt, lg);
|
||||||
|
mf->AddGeneratorTarget(tgt, gt);
|
||||||
|
|
||||||
// Organize in the "predefined targets" folder:
|
// Organize in the "predefined targets" folder:
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -85,6 +85,8 @@ void cmGlobalVisualStudioGenerator::Generate()
|
|||||||
AddUtilityCommand("ALL_BUILD", true, no_working_dir,
|
AddUtilityCommand("ALL_BUILD", true, no_working_dir,
|
||||||
no_depends, no_commands, false,
|
no_depends, no_commands, false,
|
||||||
"Build all projects");
|
"Build all projects");
|
||||||
|
cmGeneratorTarget* gt = new cmGeneratorTarget(allBuild, gen[0]);
|
||||||
|
allBuild->GetMakefile()->AddGeneratorTarget(allBuild, gt);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// Can't activate this code because we want ALL_BUILD
|
// Can't activate this code because we want ALL_BUILD
|
||||||
|
|||||||
@@ -452,6 +452,8 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
|
|||||||
cmTarget* allbuild = mf->AddUtilityCommand("ALL_BUILD", true, no_depends,
|
cmTarget* allbuild = mf->AddUtilityCommand("ALL_BUILD", true, no_depends,
|
||||||
no_working_directory,
|
no_working_directory,
|
||||||
"echo", "Build all projects");
|
"echo", "Build all projects");
|
||||||
|
cmGeneratorTarget* allBuildGt = new cmGeneratorTarget(allbuild, root);
|
||||||
|
mf->AddGeneratorTarget(allbuild, allBuildGt);
|
||||||
|
|
||||||
// Refer to the main build configuration file for easy editing.
|
// Refer to the main build configuration file for easy editing.
|
||||||
std::string listfile = mf->GetCurrentSourceDirectory();
|
std::string listfile = mf->GetCurrentSourceDirectory();
|
||||||
@@ -480,9 +482,12 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
|
|||||||
std::string file = this->ConvertToRelativeForMake(
|
std::string file = this->ConvertToRelativeForMake(
|
||||||
this->CurrentReRunCMakeMakefile.c_str());
|
this->CurrentReRunCMakeMakefile.c_str());
|
||||||
cmSystemTools::ReplaceString(file, "\\ ", " ");
|
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,
|
no_working_directory,
|
||||||
"make", "-f", file.c_str());
|
"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
|
// now make the allbuild depend on all the non-utility targets
|
||||||
|
|||||||
Reference in New Issue
Block a user