diff options
author | Brad King <brad.king@kitware.com> | 2009-10-01 14:26:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-10-01 14:26:54 (GMT) |
commit | c8ddb6813b5888fa638ed312fca6473028c61aa4 (patch) | |
tree | 591d4fbbe946089a522d0b7a43be6698f478effa /Source/cmGlobalGenerator.cxx | |
parent | e8cdd54f74851f0cc6f1fa544f48304e415ad91d (diff) | |
download | CMake-c8ddb6813b5888fa638ed312fca6473028c61aa4.zip CMake-c8ddb6813b5888fa638ed312fca6473028c61aa4.tar.gz CMake-c8ddb6813b5888fa638ed312fca6473028c61aa4.tar.bz2 |
Cleanup cmGlobalGenerator::GetTargetSets method
This commit cleans up the declaration, definition, and invocations of
the GetTargetSets method and related code. There is no change in
function except to make the method virtual.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 34cbe83..25e7602 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1931,12 +1931,11 @@ cmGlobalGenerator std::back_inserter(filenames)); } -void -cmGlobalGenerator -::GetTargetSets(cmGlobalGenerator::TargetDependSet& projectTargets, - cmGlobalGenerator::TargetDependSet& originalTargets, - cmLocalGenerator* root, - std::vector<cmLocalGenerator*> const& generators) +//---------------------------------------------------------------------------- +void cmGlobalGenerator::GetTargetSets(TargetDependSet& projectTargets, + TargetDependSet& originalTargets, + cmLocalGenerator* root, + GeneratorVector const& generators) { // loop over all local generators for(std::vector<cmLocalGenerator*>::const_iterator i = generators.begin(); @@ -1949,7 +1948,7 @@ cmGlobalGenerator } cmMakefile* mf = (*i)->GetMakefile(); // Get the targets in the makefile - cmTargets &tgts = mf->GetTargets(); + cmTargets &tgts = mf->GetTargets(); // loop over all the targets for (cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l) { @@ -1957,26 +1956,22 @@ cmGlobalGenerator // put the target in the set of original targets originalTargets.insert(target); // Get the set of targets that depend on target - this->AddTargetDepends(target, - projectTargets); + this->AddTargetDepends(target, projectTargets); } } } - -void -cmGlobalGenerator::AddTargetDepends(cmTarget* target, - cmGlobalGenerator::TargetDependSet& - projectTargets) + +//---------------------------------------------------------------------------- +void cmGlobalGenerator::AddTargetDepends(cmTarget* target, + TargetDependSet& projectTargets) { // add the target itself if(projectTargets.insert(target).second) { // This is the first time we have encountered the target. // Recursively follow its dependencies. - cmGlobalGenerator::TargetDependSet const& tset - = this->GetTargetDirectDepends(*target); - for(cmGlobalGenerator::TargetDependSet::const_iterator i = - tset.begin(); i != tset.end(); ++i) + TargetDependSet const& ts = this->GetTargetDirectDepends(*target); + for(TargetDependSet::const_iterator i = ts.begin(); i != ts.end(); ++i) { cmTarget* dtarget = *i; this->AddTargetDepends(dtarget, projectTargets); |