diff options
author | Brad King <brad.king@kitware.com> | 2021-12-07 21:05:55 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-12-08 15:03:48 (GMT) |
commit | 56dc22d48829860b50a441dcc26de14150ad724c (patch) | |
tree | c0f2f90a4b03f510c1590b97215b366ef77f21ac /Source/cmake.cxx | |
parent | c749982c13fa00a968fe0b171946b96d0884ea54 (diff) | |
download | CMake-56dc22d48829860b50a441dcc26de14150ad724c.zip CMake-56dc22d48829860b50a441dcc26de14150ad724c.tar.gz CMake-56dc22d48829860b50a441dcc26de14150ad724c.tar.bz2 |
cmMessenger: Make relative path conversion more explicit
Move the decision to convert to call stacks to relative paths out to the
client. Avoid using `cmState` to make the decision ourselves.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index d927d27..9efdb54 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1706,6 +1706,12 @@ void cmake::SetHomeDirectory(const std::string& dir) if (this->CurrentSnapshot.IsValid()) { this->CurrentSnapshot.SetDefinition("CMAKE_SOURCE_DIR", dir); } + + if (this->State->GetProjectKind() == cmState::ProjectKind::Normal) { + this->Messenger->SetTopSource(this->GetHomeDirectory()); + } else { + this->Messenger->SetTopSource(cm::nullopt); + } } std::string const& cmake::GetHomeDirectory() const |