diff options
author | Ken Martin <ken.martin@kitware.com> | 2007-04-12 19:46:14 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2007-04-12 19:46:14 (GMT) |
commit | 2a1e2456ae98a1d89715a428df7245ade72101ae (patch) | |
tree | c4c7a53c3ba7af944c47baf49dbc23beff5fa97b /Source/cmGlobalUnixMakefileGenerator3.cxx | |
parent | b4de606bdd604b0e7f4d98826aa5ea074084f890 (diff) | |
download | CMake-2a1e2456ae98a1d89715a428df7245ade72101ae.zip CMake-2a1e2456ae98a1d89715a428df7245ade72101ae.tar.gz CMake-2a1e2456ae98a1d89715a428df7245ade72101ae.tar.bz2 |
ENH: some code consolidation and cleanup
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.cxx | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index f846f40..26c8ad2 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -1003,82 +1003,6 @@ unsigned long cmGlobalUnixMakefileGenerator3 //---------------------------------------------------------------------------- -std::vector<cmTarget *>& cmGlobalUnixMakefileGenerator3 -::GetTargetDepends(cmTarget& target) -{ - // if the depends are already in the map then return - std::map<cmStdString, std::vector<cmTarget *> >::iterator tgtI = - this->TargetDependencies.find(target.GetName()); - if (tgtI != this->TargetDependencies.end()) - { - return tgtI->second; - } - - // A target should not depend on itself. - std::set<cmStdString> emitted; - emitted.insert(target.GetName()); - - // the vector of results - std::vector<cmTarget *>& result = - this->TargetDependencies[target.GetName()]; - - // Loop over all library dependencies but not for static libs - if (target.GetType() != cmTarget::STATIC_LIBRARY) - { - const cmTarget::LinkLibraryVectorType& tlibs = target.GetLinkLibraries(); - for(cmTarget::LinkLibraryVectorType::const_iterator lib = tlibs.begin(); - lib != tlibs.end(); ++lib) - { - // Don't emit the same library twice for this target. - if(emitted.insert(lib->first).second) - { - cmTarget *target2 = - target.GetMakefile()->FindTarget(lib->first.c_str()); - - // search each local generator until a match is found - if (!target2) - { - target2 = this->FindTarget(0,lib->first.c_str()); - } - - // if a match was found then ... - if (target2) - { - // Add this dependency. - result.push_back(target2); - } - } - } - } - - // Loop over all utility dependencies. - const std::set<cmStdString>& tutils = target.GetUtilities(); - for(std::set<cmStdString>::const_iterator util = tutils.begin(); - util != tutils.end(); ++util) - { - // Don't emit the same utility twice for this target. - if(emitted.insert(*util).second) - { - cmTarget *target2 = target.GetMakefile()->FindTarget(util->c_str()); - - // search each local generator until a match is found - if (!target2) - { - target2 = this->FindTarget(0,util->c_str()); - } - - // if a match was found then ... - if (target2) - { - // Add this dependency. - result.push_back(target2); - } - } - } - return result; -} - -//---------------------------------------------------------------------------- void cmGlobalUnixMakefileGenerator3 ::AppendGlobalTargetDepends(std::vector<std::string>& depends, |