diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-01-15 16:56:41 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-01-15 16:56:41 (GMT) |
commit | feea7133ef7b48a5b39b2f0c8b1e86e5e159dc29 (patch) | |
tree | 72abdb2221841e5e407c5adf91b58d9ca110cc1f | |
parent | 34c04d6d02acab067353e28155b546ad32617b55 (diff) | |
download | CMake-feea7133ef7b48a5b39b2f0c8b1e86e5e159dc29.zip CMake-feea7133ef7b48a5b39b2f0c8b1e86e5e159dc29.tar.gz CMake-feea7133ef7b48a5b39b2f0c8b1e86e5e159dc29.tar.bz2 |
BUG: fix for bug 6234, use cd /d so that drives can be changed.
-rw-r--r-- | Source/cmLocalVisualStudioGenerator.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index 1cae2f7..a12a4db 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -19,6 +19,7 @@ #include "cmMakefile.h" #include "cmSourceFile.h" #include "cmSystemTools.h" +#include "windows.h" //---------------------------------------------------------------------------- cmLocalVisualStudioGenerator::cmLocalVisualStudioGenerator() @@ -143,6 +144,13 @@ cmLocalVisualStudioGenerator script += newline; newline = newline_text; script += "cd "; + OSVERSIONINFO osv; + osv.dwOSVersionInfoSize = sizeof(osv); + GetVersionEx(&osv); + if(osv.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS) + { + script += "/d "; + } script += this->Convert(workingDirectory, START_OUTPUT, SHELL); // Change the working drive. |