[cmake-commits] martink committed cmGlobalUnixMakefileGenerator3.cxx
1.103 1.104 cmGlobalUnixMakefileGenerator3.h 1.38 1.39
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Apr 12 15:46:16 EDT 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv24561/Source
Modified Files:
cmGlobalUnixMakefileGenerator3.cxx
cmGlobalUnixMakefileGenerator3.h
Log Message:
ENH: some code consolidation and cleanup
Index: cmGlobalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalUnixMakefileGenerator3.cxx,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- cmGlobalUnixMakefileGenerator3.cxx 12 Apr 2007 18:21:58 -0000 1.103
+++ cmGlobalUnixMakefileGenerator3.cxx 12 Apr 2007 19:46:14 -0000 1.104
@@ -1003,82 +1003,6 @@
//----------------------------------------------------------------------------
-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,
Index: cmGlobalUnixMakefileGenerator3.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalUnixMakefileGenerator3.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- cmGlobalUnixMakefileGenerator3.h 14 Dec 2006 19:30:16 -0000 1.38
+++ cmGlobalUnixMakefileGenerator3.h 12 Apr 2007 19:46:14 -0000 1.39
@@ -132,9 +132,6 @@
unsigned long GetNumberOfProgressActionsInAll
(cmLocalUnixMakefileGenerator3 *lg);
- // what targets does the specified target depend on
- std::vector<cmTarget *>& GetTargetDepends(cmTarget& target);
-
protected:
void WriteMainMakefile2();
void WriteMainCMakefile();
@@ -187,7 +184,6 @@
typedef std::map<cmStdString, cmStdString> MultipleOutputPairsType;
MultipleOutputPairsType MultipleOutputPairs;
- std::map<cmStdString, std::vector<cmTarget *> > TargetDependencies;
std::map<cmStdString, int > TargetSourceFileCount;
};
More information about the Cmake-commits
mailing list