diff options
author | Brad King <brad.king@kitware.com> | 2018-10-17 14:46:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-10-18 12:11:19 (GMT) |
commit | dacbb414550db63ff40225f3f6057c3c74bcf5c9 (patch) | |
tree | 6f51a0e964005de1c3a715e8734181838777aa2a /Source/cmGraphAdjacencyList.h | |
parent | a6e02f881dc5e74d79201f761fb28c99a9e7d2af (diff) | |
download | CMake-dacbb414550db63ff40225f3f6057c3c74bcf5c9.zip CMake-dacbb414550db63ff40225f3f6057c3c74bcf5c9.tar.gz CMake-dacbb414550db63ff40225f3f6057c3c74bcf5c9.tar.bz2 |
Track backtraces in target dependencies internally
Carry backtraces on target dependency edges to refer to the line in
project code that caused the edge to appear.
Diffstat (limited to 'Source/cmGraphAdjacencyList.h')
-rw-r--r-- | Source/cmGraphAdjacencyList.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmGraphAdjacencyList.h b/Source/cmGraphAdjacencyList.h index 6a0a799..fb2eee2 100644 --- a/Source/cmGraphAdjacencyList.h +++ b/Source/cmGraphAdjacencyList.h @@ -5,6 +5,8 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include "cmListFileCache.h" + #include <vector> /** @@ -15,18 +17,22 @@ class cmGraphEdge { public: - cmGraphEdge(int n = 0, bool s = true) + cmGraphEdge(int n, bool s, cmListFileBacktrace const& bt) : Dest(n) , Strong(s) + , Backtrace(bt) { } operator int() const { return this->Dest; } bool IsStrong() const { return this->Strong; } + cmListFileBacktrace const& GetBacktrace() const { return this->Backtrace; } + private: int Dest; bool Strong; + cmListFileBacktrace Backtrace; }; struct cmGraphEdgeList : public std::vector<cmGraphEdge> { |