1
0
Эх сурвалжийг харах

BUG: ConvertToQuotedOutputPath must replace slashes in root component on windows.

Brad King 20 жил өмнө
parent
commit
f11f012cd7

+ 12 - 0
Source/cmLocalUnixMakefileGenerator2.cxx

@@ -2333,6 +2333,18 @@ cmLocalUnixMakefileGenerator2::ConvertToQuotedOutputPath(const char* p)
     return "\"\"";
     }
 
+  // Fix root component slash direction for windows.
+#if defined(_WIN32) && !defined(__CYGWIN__)
+  for(std::string::iterator i = components[0].begin();
+      i != components[0].end(); ++i)
+    {
+    if(*i == '/')
+      {
+      *i = '\\';
+      }
+    }
+#endif
+
   // Begin the quoted result with the root component.
   std::string result = "\"";
   result += components[0];