summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-09-28 14:37:19 (GMT)
committerBrad King <brad.king@kitware.com>2006-09-28 14:37:19 (GMT)
commit019dabc97fd8e71c4682a653138069d0a3026558 (patch)
tree3b16b43e3098881c259048151da6520c753b6f80 /Source/cmLocalGenerator.cxx
parent0b135767d6670c9b9fc51d50f7e222394383a374 (diff)
downloadCMake-019dabc97fd8e71c4682a653138069d0a3026558.zip
CMake-019dabc97fd8e71c4682a653138069d0a3026558.tar.gz
CMake-019dabc97fd8e71c4682a653138069d0a3026558.tar.bz2
BUG: MSYS makefile shell needs posix paths to executables in some cases and it does not hurt to do it always.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 95eb666..bcd05c3 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -40,6 +40,7 @@ cmLocalGenerator::cmLocalGenerator()
this->Parent = 0;
this->WindowsShell = false;
this->WindowsVSIDE = false;
+ this->MSYSShell = false;
this->IgnoreLibPrefix = false;
this->UseRelativePaths = false;
this->Configured = false;
@@ -2007,6 +2008,18 @@ std::string cmLocalGenerator::Convert(const char* source,
{
cmSystemTools::SetForceUnixPaths(true);
}
+
+ // For the MSYS shell convert drive letters to posix paths, so
+ // that c:/some/path becomes /c/some/path. This is needed to
+ // avoid problems with the shell path translation.
+ if(this->MSYSShell)
+ {
+ if(result.size() > 2 && result[1] == ':')
+ {
+ result[1] = result[0];
+ result[0] = '/';
+ }
+ }
}
return result;
}