summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-11-13 12:01:28 (GMT)
committerBrad King <brad.king@kitware.com>2018-12-11 17:50:21 (GMT)
commit03d40110dc791a803345150806ef3a13ba3a0957 (patch)
tree8054a6d07e29e4a9a660e96b4d856f71ee377a7d
parent5751a09092a35554ebdd75ea0aa05c63ec414734 (diff)
downloadCMake-03d40110dc791a803345150806ef3a13ba3a0957.zip
CMake-03d40110dc791a803345150806ef3a13ba3a0957.tar.gz
CMake-03d40110dc791a803345150806ef3a13ba3a0957.tar.bz2
cmStateSnapshot: Add method to get current directory snapshot
-rw-r--r--Source/cmStateSnapshot.cxx6
-rw-r--r--Source/cmStateSnapshot.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx
index c2510f3..a649f5e 100644
--- a/Source/cmStateSnapshot.cxx
+++ b/Source/cmStateSnapshot.cxx
@@ -66,6 +66,12 @@ bool cmStateSnapshot::IsValid() const
: false;
}
+cmStateSnapshot cmStateSnapshot::GetBuildsystemDirectory() const
+{
+ return cmStateSnapshot(this->State,
+ this->Position->BuildSystemDirectory->DirectoryEnd);
+}
+
cmStateSnapshot cmStateSnapshot::GetBuildsystemDirectoryParent() const
{
cmStateSnapshot snapshot;
diff --git a/Source/cmStateSnapshot.h b/Source/cmStateSnapshot.h
index 014c62e..c315f48 100644
--- a/Source/cmStateSnapshot.h
+++ b/Source/cmStateSnapshot.h
@@ -37,6 +37,7 @@ public:
std::vector<cmStateSnapshot> GetChildren();
bool IsValid() const;
+ cmStateSnapshot GetBuildsystemDirectory() const;
cmStateSnapshot GetBuildsystemDirectoryParent() const;
cmStateSnapshot GetCallStackParent() const;
cmStateSnapshot GetCallStackBottom() const;