diff options
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 |