cmLocalGenerator: Simplify semantic of adding generator targets.
Don't store on the global generator as a side effect. Update clients to adapt.
This commit is contained in:
parent
400e3d19fc
commit
04b6bb1676
|
@ -257,6 +257,7 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
|
||||||
|
|
||||||
cmGeneratorTarget* gt = new cmGeneratorTarget(tgt, lg);
|
cmGeneratorTarget* gt = new cmGeneratorTarget(tgt, lg);
|
||||||
lg->AddGeneratorTarget(tgt, gt);
|
lg->AddGeneratorTarget(tgt, gt);
|
||||||
|
this->AddGeneratorTarget(tgt, gt);
|
||||||
|
|
||||||
// Organize in the "predefined targets" folder:
|
// Organize in the "predefined targets" folder:
|
||||||
//
|
//
|
||||||
|
|
|
@ -88,6 +88,7 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets()
|
||||||
|
|
||||||
cmGeneratorTarget* gt = new cmGeneratorTarget(allBuild, gen[0]);
|
cmGeneratorTarget* gt = new cmGeneratorTarget(allBuild, gen[0]);
|
||||||
gen[0]->AddGeneratorTarget(allBuild, gt);
|
gen[0]->AddGeneratorTarget(allBuild, gt);
|
||||||
|
this->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
|
||||||
|
|
|
@ -460,6 +460,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
|
||||||
|
|
||||||
cmGeneratorTarget* allBuildGt = new cmGeneratorTarget(allbuild, root);
|
cmGeneratorTarget* allBuildGt = new cmGeneratorTarget(allbuild, root);
|
||||||
root->AddGeneratorTarget(allbuild, allBuildGt);
|
root->AddGeneratorTarget(allbuild, allBuildGt);
|
||||||
|
root->GetGlobalGenerator()->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 = root->GetCurrentSourceDirectory();
|
std::string listfile = root->GetCurrentSourceDirectory();
|
||||||
|
@ -495,6 +496,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
|
||||||
|
|
||||||
cmGeneratorTarget* checkGt = new cmGeneratorTarget(check, root);
|
cmGeneratorTarget* checkGt = new cmGeneratorTarget(check, root);
|
||||||
root->AddGeneratorTarget(check, checkGt);
|
root->AddGeneratorTarget(check, checkGt);
|
||||||
|
root->GetGlobalGenerator()->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
|
||||||
|
|
|
@ -451,7 +451,6 @@ void cmLocalGenerator::GenerateInstallRules()
|
||||||
void cmLocalGenerator::AddGeneratorTarget(cmTarget* t, cmGeneratorTarget* gt)
|
void cmLocalGenerator::AddGeneratorTarget(cmTarget* t, cmGeneratorTarget* gt)
|
||||||
{
|
{
|
||||||
this->GeneratorTargets[t] = gt;
|
this->GeneratorTargets[t] = gt;
|
||||||
this->GetGlobalGenerator()->AddGeneratorTarget(t, gt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
|
@ -896,6 +896,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget(
|
||||||
|
|
||||||
cmGeneratorTarget* gt = new cmGeneratorTarget(autogenTarget, lg);
|
cmGeneratorTarget* gt = new cmGeneratorTarget(autogenTarget, lg);
|
||||||
lg->AddGeneratorTarget(autogenTarget, gt);
|
lg->AddGeneratorTarget(autogenTarget, gt);
|
||||||
|
lg->GetGlobalGenerator()->AddGeneratorTarget(autogenTarget, gt);
|
||||||
|
|
||||||
// Set target folder
|
// Set target folder
|
||||||
const char* autogenFolder = makefile->GetState()
|
const char* autogenFolder = makefile->GetState()
|
||||||
|
|
Loading…
Reference in New Issue