summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkDepends.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-07-28 19:30:56 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-07-28 19:30:56 (GMT)
commitbd0d03386b0f02aa34da5438d8f78575cf2642e7 (patch)
tree31cf890670f8121a5668a2b65516ba3ec220f660 /Source/cmComputeLinkDepends.cxx
parent7788494257e0a1a22468b5542f9d8c5cb8c3dfed (diff)
downloadCMake-bd0d03386b0f02aa34da5438d8f78575cf2642e7.zip
CMake-bd0d03386b0f02aa34da5438d8f78575cf2642e7.tar.gz
CMake-bd0d03386b0f02aa34da5438d8f78575cf2642e7.tar.bz2
cmComputeComponentGraph: Move work out of constructor into Compute() method
The computation of Tarjan's algorithm is an expensive operation which should not be done in the constructor. Move this work into a dedicated Compute() method, and call this method explicitly.
Diffstat (limited to 'Source/cmComputeLinkDepends.cxx')
-rw-r--r--Source/cmComputeLinkDepends.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 607b948..8ca2168 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -626,6 +626,7 @@ void cmComputeLinkDepends::OrderLinkEntires()
// constraints disallow it.
this->CCG =
cm::make_unique<cmComputeComponentGraph>(this->EntryConstraintGraph);
+ this->CCG->Compute();
// The component graph is guaranteed to be acyclic. Start a DFS
// from every entry to compute a topological order for the