diff options
author | Brad King <brad.king@kitware.com> | 2015-07-02 13:06:17 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-07-02 13:06:17 (GMT) |
commit | ef97d4429f3b6aa56ee2266c6ecfa47032858d82 (patch) | |
tree | 3c4dc6952ca8f97495473d0510a261a1fd6a3476 /Source/cmGlobalGenerator.cxx | |
parent | 5647b243be2c5016dfd558d17547f0ddf89046f0 (diff) | |
parent | d4a8a554ea2b3af2ea850cf003e35ac23118a33b (diff) | |
download | CMake-ef97d4429f3b6aa56ee2266c6ecfa47032858d82.zip CMake-ef97d4429f3b6aa56ee2266c6ecfa47032858d82.tar.gz CMake-ef97d4429f3b6aa56ee2266c6ecfa47032858d82.tar.bz2 |
Merge topic 'use-generator-target'
d4a8a554 cmGlobalGenerator: Map local generators to generator targets.
faec4e61 cmComputeTargetDepends: Change API to use cmGeneratorTarget.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 383984d..88ac0bc 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1355,9 +1355,9 @@ bool cmGlobalGenerator::ComputeTargetDepends() { return false; } - std::vector<cmTarget const*> const& targets = ctd.GetTargets(); - for(std::vector<cmTarget const*>::const_iterator ti = targets.begin(); - ti != targets.end(); ++ti) + std::vector<cmGeneratorTarget const*> const& targets = ctd.GetTargets(); + for(std::vector<cmGeneratorTarget const*>::const_iterator ti + = targets.begin(); ti != targets.end(); ++ti) { ctd.GetTargetDirectDepends(*ti, this->TargetDependencies[*ti]); } @@ -2044,19 +2044,19 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap() clg = clg->GetParent()) { // This local generator includes the target. - std::set<cmTarget const*>& targetSet = + std::set<cmGeneratorTarget const*>& targetSet = this->LocalGeneratorToTargetMap[clg]; - targetSet.insert(&target); + cmGeneratorTarget* gt = this->GetGeneratorTarget(&target); + targetSet.insert(gt); // Add dependencies of the included target. An excluded // target may still be included if it is a dependency of a // non-excluded target. - TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(target); + TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(gt); for(TargetDependSet::const_iterator ti = tgtdeps.begin(); ti != tgtdeps.end(); ++ti) { - cmTarget const* ttt = *ti; - targetSet.insert(ttt); + targetSet.insert(*ti); } } } @@ -2518,9 +2518,9 @@ void cmGlobalGenerator::AppendDirectoryForConfig(const std::string&, //---------------------------------------------------------------------------- cmGlobalGenerator::TargetDependSet const& -cmGlobalGenerator::GetTargetDirectDepends(cmTarget const& target) +cmGlobalGenerator::GetTargetDirectDepends(cmGeneratorTarget const* target) { - return this->TargetDependencies[&target]; + return this->TargetDependencies[target]; } void cmGlobalGenerator::AddTarget(cmTarget* t) @@ -2620,9 +2620,10 @@ void cmGlobalGenerator::GetTargetSets(TargetDependSet& projectTargets, continue; } // put the target in the set of original targets - originalTargets.insert(target); + cmGeneratorTarget* gt = this->GetGeneratorTarget(target); + originalTargets.insert(gt); // Get the set of targets that depend on target - this->AddTargetDepends(target, projectTargets); + this->AddTargetDepends(gt, projectTargets); } } } @@ -2635,7 +2636,7 @@ bool cmGlobalGenerator::IsRootOnlyTarget(cmTarget* target) const } //---------------------------------------------------------------------------- -void cmGlobalGenerator::AddTargetDepends(cmTarget const* target, +void cmGlobalGenerator::AddTargetDepends(cmGeneratorTarget const* target, TargetDependSet& projectTargets) { // add the target itself @@ -2643,11 +2644,10 @@ void cmGlobalGenerator::AddTargetDepends(cmTarget const* target, { // This is the first time we have encountered the target. // Recursively follow its dependencies. - TargetDependSet const& ts = this->GetTargetDirectDepends(*target); + TargetDependSet const& ts = this->GetTargetDirectDepends(target); for(TargetDependSet::const_iterator i = ts.begin(); i != ts.end(); ++i) { - cmTarget const* dtarget = *i; - this->AddTargetDepends(dtarget, projectTargets); + this->AddTargetDepends(*i, projectTargets); } } } |