diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-04 21:30:29 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-16 06:12:02 (GMT) |
commit | 9e4b6cc2cebc7af40432f5027d2960c0cc68515f (patch) | |
tree | ac9f3904c2cbba953194704dd637802e0311764d /Source/cmState.h | |
parent | 991f5e4968ce7b86aea12224b4cecc1be3ed92d9 (diff) | |
download | CMake-9e4b6cc2cebc7af40432f5027d2960c0cc68515f.zip CMake-9e4b6cc2cebc7af40432f5027d2960c0cc68515f.tar.gz CMake-9e4b6cc2cebc7af40432f5027d2960c0cc68515f.tar.bz2 |
cmState: Store computed relative paths to to current directories.
Diffstat (limited to 'Source/cmState.h')
-rw-r--r-- | Source/cmState.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmState.h b/Source/cmState.h index faf0739..23d3f0d 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -39,10 +39,19 @@ public: std::vector<std::string> const& GetCurrentSourceDirectoryComponents(); std::vector<std::string> const& GetCurrentBinaryDirectoryComponents(); + const char* GetRelativePathTopSource() const; + const char* GetRelativePathTopBinary() const; + void SetRelativePathTopSource(const char* dir); + void SetRelativePathTopBinary(const char* dir); + bool IsValid() const; Snapshot GetParent() const; private: + void ComputeRelativePathTopSource(); + void ComputeRelativePathTopBinary(); + + private: friend class cmState; cmState* State; cmState::PositionType Position; @@ -141,6 +150,13 @@ private: std::vector<std::vector<std::string> > CurrentSourceDirectoryComponents; std::vector<std::vector<std::string> > CurrentBinaryDirectoryComponents; + // The top-most directories for relative path conversion. Both the + // source and destination location of a relative path conversion + // must be underneath one of these directories (both under source or + // both under binary) in order for the relative path to be evaluated + // safely by the build tools. + std::vector<std::string> RelativePathTopSource; + std::vector<std::string> RelativePathTopBinary; std::vector<std::string> SourceDirectoryComponents; std::vector<std::string> BinaryDirectoryComponents; |