Explorar el Código

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.
Brad King hace 4 años
padre
commit
2d9109df7c
Se han modificado 1 ficheros con 1 adiciones y 12 borrados
  1. 1 12
      Source/cmStateDirectory.cxx

+ 1 - 12
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