mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
cmStateDirectory: Remove network path logic from relative path top selection
The logic skipping relative paths for build trees on network paths came from commitb5035770bc(BUG: On Windows network paths do not really work..., 2003-12-24, v2.4.0~3517). However, since commitad4055f3e2(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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user