diff options
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r-- | Source/cmState.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 82a2939..aa690dc 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -458,6 +458,10 @@ void cmState::SetSourceDirectory(std::string const& sourceDirectory) { this->SourceDirectory = sourceDirectory; cmSystemTools::ConvertToUnixSlashes(this->SourceDirectory); + + cmSystemTools::SplitPath( + cmSystemTools::CollapseFullPath(this->SourceDirectory), + this->SourceDirectoryComponents); } const char* cmState::GetSourceDirectory() const @@ -465,10 +469,19 @@ const char* cmState::GetSourceDirectory() const return this->SourceDirectory.c_str(); } +std::vector<std::string> const& cmState::GetSourceDirectoryComponents() const +{ + return this->SourceDirectoryComponents; +} + void cmState::SetBinaryDirectory(std::string const& binaryDirectory) { this->BinaryDirectory = binaryDirectory; cmSystemTools::ConvertToUnixSlashes(this->BinaryDirectory); + + cmSystemTools::SplitPath( + cmSystemTools::CollapseFullPath(this->BinaryDirectory), + this->BinaryDirectoryComponents); } const char* cmState::GetBinaryDirectory() const @@ -476,6 +489,11 @@ const char* cmState::GetBinaryDirectory() const return this->BinaryDirectory.c_str(); } +std::vector<std::string> const& cmState::GetBinaryDirectoryComponents() const +{ + return this->BinaryDirectoryComponents; +} + cmState::Snapshot cmState::CreateSnapshot(Snapshot originSnapshot) { PositionType pos = this->ParentPositions.size(); |