diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-06-06 11:08:17 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-07-01 17:46:19 (GMT) |
commit | faec4e611d08ea2f75d2127e3ca3f5e9a427465b (patch) | |
tree | ab775b2bf9a9a4517204b700e4add7e41ca726c3 /Source/cmGlobalGenerator.cxx | |
parent | 7e3ac12df45fa42b590971accaf1db89b1a0ffb6 (diff) | |
download | CMake-faec4e611d08ea2f75d2127e3ca3f5e9a427465b.zip CMake-faec4e611d08ea2f75d2127e3ca3f5e9a427465b.tar.gz CMake-faec4e611d08ea2f75d2127e3ca3f5e9a427465b.tar.bz2 |
cmComputeTargetDepends: Change API to use cmGeneratorTarget.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 23ab93d..a69732e 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1354,9 +1354,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]); } @@ -2050,12 +2050,13 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap() // 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); + cmGeneratorTarget* gt = this->GetGeneratorTarget(&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); + cmGeneratorTarget const* ttt = *ti; + targetSet.insert(ttt->Target); } } } @@ -2517,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) @@ -2619,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); } } } @@ -2634,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 @@ -2642,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); } } } |