[cmake-commits] hoffman committed cmLocalVisualStudioGenerator.cxx 1.14 1.15

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Jan 15 11:56:43 EST 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv17927

Modified Files:
	cmLocalVisualStudioGenerator.cxx 
Log Message:
BUG: fix for bug 6234, use cd /d so that drives can be changed. 


Index: cmLocalVisualStudioGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudioGenerator.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- cmLocalVisualStudioGenerator.cxx	17 Dec 2007 23:38:19 -0000	1.14
+++ cmLocalVisualStudioGenerator.cxx	15 Jan 2008 16:56:41 -0000	1.15
@@ -19,6 +19,7 @@
 #include "cmMakefile.h"
 #include "cmSourceFile.h"
 #include "cmSystemTools.h"
+#include "windows.h"
 
 //----------------------------------------------------------------------------
 cmLocalVisualStudioGenerator::cmLocalVisualStudioGenerator()
@@ -143,6 +144,13 @@
     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.



More information about the Cmake-commits mailing list