소스 검색

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

Brad King 20 년 전
부모
커밋
f11f012cd7
1개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 12 0
      Source/cmLocalUnixMakefileGenerator2.cxx

+ 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];