diff options
author | Brad King <brad.king@kitware.com> | 2008-02-07 21:14:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-02-07 21:14:05 (GMT) |
commit | 4987e17f46cb2542106ee2d9afe2752ef78d0f1f (patch) | |
tree | 15f70e63f520fb34572ba7147b6231b1e6612276 /Source/cmComputeLinkDepends.h | |
parent | 0bfad2946dc3da390fed5b58dcf493b55886aa31 (diff) | |
download | CMake-4987e17f46cb2542106ee2d9afe2752ef78d0f1f.zip CMake-4987e17f46cb2542106ee2d9afe2752ef78d0f1f.tar.gz CMake-4987e17f46cb2542106ee2d9afe2752ef78d0f1f.tar.bz2 |
ENH: Improve link line generation for static library cycles.
- Move Tarjan algorithm from cmComputeTargetDepends
into its own class cmComputeComponentGraph
- Use cmComputeComponentGraph to identify the component DAG
of link dependencies in cmComputeLinkDepends
- Emit non-trivial component members more than once but always
in a contiguous group on the link line
Diffstat (limited to 'Source/cmComputeLinkDepends.h')
-rw-r--r-- | Source/cmComputeLinkDepends.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index 1e422a6..b81f8bc 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -20,8 +20,11 @@ #include "cmStandardIncludes.h" #include "cmTarget.h" +#include "cmGraphAdjacencyList.h" + #include <queue> +class cmComputeComponentGraph; class cmGlobalGenerator; class cmLocalGenerator; class cmMakefile; @@ -109,16 +112,18 @@ private: void InferDependencies(); // Ordering constraint graph adjacency list. - struct EntryConstraintSet: public std::set<int> {}; - std::vector<EntryConstraintSet> EntryConstraintGraph; + typedef cmGraphNodeList NodeList; + typedef cmGraphAdjacencyList Graph; + Graph EntryConstraintGraph; + void CleanConstraintGraph(); void DisplayConstraintGraph(); // Ordering algorithm. - std::vector<int> EntryVisited; - std::set<int> EntryEmitted; - int WalkId; void OrderLinkEntires(); - void VisitLinkEntry(unsigned int i); + std::vector<char> ComponentVisited; + void DisplayComponents(cmComputeComponentGraph const& ccg); + void VisitComponent(cmComputeComponentGraph const& ccg, unsigned int i); + void EmitComponent(NodeList const& nl); void DisplayFinalEntries(); }; |