summaryrefslogtreecommitdiffstats
path: root/Source/cmGraphAdjacencyList.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-17 14:46:00 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-18 12:11:19 (GMT)
commitdacbb414550db63ff40225f3f6057c3c74bcf5c9 (patch)
tree6f51a0e964005de1c3a715e8734181838777aa2a /Source/cmGraphAdjacencyList.h
parenta6e02f881dc5e74d79201f761fb28c99a9e7d2af (diff)
downloadCMake-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.h8
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>
{