From 03d40110dc791a803345150806ef3a13ba3a0957 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 13 Nov 2018 07:01:28 -0500 Subject: cmStateSnapshot: Add method to get current directory snapshot --- Source/cmStateSnapshot.cxx | 6 ++++++ Source/cmStateSnapshot.h | 1 + 2 files changed, 7 insertions(+) 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 GetChildren(); bool IsValid() const; + cmStateSnapshot GetBuildsystemDirectory() const; cmStateSnapshot GetBuildsystemDirectoryParent() const; cmStateSnapshot GetCallStackParent() const; cmStateSnapshot GetCallStackBottom() const; -- cgit v0.12