diff options
author | Brad King <brad.king@kitware.com> | 2021-05-14 19:29:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-05-17 14:02:16 (GMT) |
commit | 2d9109df7cae62138d7d0347f4e90330d053424b (patch) | |
tree | 2f1986b8b2440726630dee208d5178fb79b4c4ee /Source/cmStateDirectory.cxx | |
parent | b4f07bfe5ad822b6e07372ceb06485aafc68a774 (diff) | |
download | CMake-2d9109df7cae62138d7d0347f4e90330d053424b.zip CMake-2d9109df7cae62138d7d0347f4e90330d053424b.tar.gz CMake-2d9109df7cae62138d7d0347f4e90330d053424b.tar.bz2 |
cmStateDirectory: Remove network path logic from relative path top selection
The logic skipping relative paths for build trees on network paths came
from commit b5035770bc (BUG: On Windows network paths do not really
work..., 2003-12-24, v2.4.0~3517). However, since commit ad4055f3e2
(ENH: Set RelativePathTopSource and RelativePathTopBinary independently
..., 2007-03-07, v2.6.0~2061) we effectively ignore this logic if the
build tree is inside the source tree on a network path. Also, it is not
clear that logic using `RelativePathTopBinary` is prepared for it to be
empty. Remove the logic for now. If a problem comes up, we can choose
a new approach.
Diffstat (limited to 'Source/cmStateDirectory.cxx')
-rw-r--r-- | Source/cmStateDirectory.cxx | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/Source/cmStateDirectory.cxx b/Source/cmStateDirectory.cxx index 804b776..31ee458 100644 --- a/Source/cmStateDirectory.cxx +++ b/Source/cmStateDirectory.cxx @@ -26,10 +26,6 @@ static std::string const kSUBDIRECTORIES = "SUBDIRECTORIES"; void cmStateDirectory::ComputeRelativePathTopSource() { - // Relative path conversion inside the source tree is not used to - // construct relative paths passed to build tools so it is safe to use - // even when the source is a network path. - cmStateSnapshot snapshot = this->Snapshot_; std::vector<cmStateSnapshot> snapshots; snapshots.push_back(snapshot); @@ -80,14 +76,7 @@ void cmStateDirectory::ComputeRelativePathTopBinary() } } - // The current working directory on Windows cannot be a network - // path. Therefore relative paths cannot work when the binary tree - // is a network path. - if (result.size() < 2 || result.substr(0, 2) != "//") { - this->DirectoryState->RelativePathTopBinary = result; - } else { - this->DirectoryState->RelativePathTopBinary.clear(); - } + this->DirectoryState->RelativePathTopBinary = result; } std::string const& cmStateDirectory::GetCurrentSource() const |