summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-02-25 14:14:34 (GMT)
committerBrad King <brad.king@kitware.com>2005-02-25 14:14:34 (GMT)
commitf11f012cd7c7d4cc3be4bd08a28dd1f0afb923ee (patch)
tree67a1262f5116023838df3f216dcfb69bb6ac97ce
parent03e2878db895efacc199253fabafb8ffa1c2150d (diff)
downloadCMake-f11f012cd7c7d4cc3be4bd08a28dd1f0afb923ee.zip
CMake-f11f012cd7c7d4cc3be4bd08a28dd1f0afb923ee.tar.gz
CMake-f11f012cd7c7d4cc3be4bd08a28dd1f0afb923ee.tar.bz2
BUG: ConvertToQuotedOutputPath must replace slashes in root component on windows.
-rw-r--r--Source/cmLocalUnixMakefileGenerator2.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator2.cxx b/Source/cmLocalUnixMakefileGenerator2.cxx
index fea3d75..85256a6 100644
--- a/Source/cmLocalUnixMakefileGenerator2.cxx
+++ b/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];