summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-08-28 18:55:14 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-08-28 18:55:14 (GMT)
commitf85fc7cda1e6caa625eee71019bcb57c932ba0ab (patch)
tree00cf524d05948f56bce508297a6187e8431748c9 /Source/cmSystemTools.cxx
parent1df66821a38faf1849bbeaf95297ace71ff4f401 (diff)
downloadCMake-f85fc7cda1e6caa625eee71019bcb57c932ba0ab.zip
CMake-f85fc7cda1e6caa625eee71019bcb57c932ba0ab.tar.gz
CMake-f85fc7cda1e6caa625eee71019bcb57c932ba0ab.tar.bz2
better network build support
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx27
1 files changed, 25 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 72ffca0..557a80d 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -313,11 +313,34 @@ void cmSystemTools::ExpandRegistryValues(std::string& source)
}
+std::string cmSystemTools::HandleNetworkPaths(const char* str)
+{
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ std::string result;
+ // watch for network paths, MSVC can't seem to load //
+ if (strlen(str) > 2 && str[0] == '/' && str[1] == '/')
+ {
+ result = "\\\\";
+ result += (str + 2);
+ }
+ else
+ {
+ result += str;
+ }
+#else
+ std::string result = "";
+#endif
+ return result;
+}
+
std::string cmSystemTools::EscapeSpaces(const char* str)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- std::string result = str;
- return "\""+result+"\"";
+ std::string result;
+
+ result = "\"";
+ result += cmSystemTools::HandleNetworkPaths(str);
+ return result+"\"";
#else
std::string result = "";
for(const char* ch = str; *ch != '\0'; ++ch)