[cmake-commits] king committed cmLocalVisualStudioGenerator.cxx 1.13 1.14

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Dec 17 18:38:21 EST 2007


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

Modified Files:
	cmLocalVisualStudioGenerator.cxx 
Log Message:
BUG: When the working directory for a custom command is on another drive letter we need to change to that drive letter after changing its working directory.  Fixes issue #6150.


Index: cmLocalVisualStudioGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudioGenerator.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- cmLocalVisualStudioGenerator.cxx	27 Aug 2007 21:05:43 -0000	1.13
+++ cmLocalVisualStudioGenerator.cxx	17 Dec 2007 23:38:19 -0000	1.14
@@ -139,10 +139,20 @@
   std::string script;
   if(workingDirectory)
     {
+    // Change the working directory.
     script += newline;
     newline = newline_text;
     script += "cd ";
     script += this->Convert(workingDirectory, START_OUTPUT, SHELL);
+
+    // Change the working drive.
+    if(workingDirectory[0] && workingDirectory[1] == ':')
+      {
+      script += newline;
+      newline = newline_text;
+      script += workingDirectory[0];
+      script += workingDirectory[1];
+      }
     }
   // for visual studio IDE add extra stuff to the PATH
   // if CMAKE_MSVCIDE_RUN_PATH is set.



More information about the Cmake-commits mailing list