From f11f012cd7c7d4cc3be4bd08a28dd1f0afb923ee Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 25 Feb 2005 09:14:34 -0500 Subject: [PATCH] BUG: ConvertToQuotedOutputPath must replace slashes in root component on windows. --- Source/cmLocalUnixMakefileGenerator2.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Source/cmLocalUnixMakefileGenerator2.cxx b/Source/cmLocalUnixMakefileGenerator2.cxx index fea3d750c2..85256a6333 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];