View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006234CMakeCMakepublic2008-01-11 07:442008-01-15 14:09
Reporterbullestock 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0006234: Visual Studio: No support for building on different drive
DescriptionWhen the build directory is located on another drive than the source directory, custom build steps can fail because the generated .vcproj files issue only a 'cd' command, which does not change the drive. The fix is simple: Add a /d to the cd command (alas, this does not work for Windows versions below W2K).

See patch against 2.4.7 below.
Additional Information--- c:/user/tma/cmake-2.4.7/Source.orig/cmLocalVisualStudioGenerator.cxx Mon Jul 16 17:16:44 2007
+++ c:/user/tma/cmake-2.4.7/Source/cmLocalVisualStudioGenerator.cxx Thu Jan 10 09:00:29 2008
@@ -20,6 +20,8 @@
 #include "cmSourceFile.h"
 #include "cmSystemTools.h"
 
+#include <windows.h>
+
 //----------------------------------------------------------------------------
 cmLocalVisualStudioGenerator::cmLocalVisualStudioGenerator()
 {
@@ -125,6 +127,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);
     }
   // for visual studio IDE add extra stuff to the PATH

TagsNo tags attached.
Attached Files

 Relationships
duplicate of 0006150closedBrad King WORKING_DIRECTORY in ADD_CUSTOM_COMMAND fails when the directory is on a different drive. (VS2005) 

  Notes
(0010152)
Bill Hoffman (manager)
2008-01-15 11:57

Thanks, done:

$ cvs commit -m "BUG: fix for bug 6234, use cd /d so that drives can be changed. " cmLocalVisualStudioGenerator.cxx
/cvsroot/CMake/CMake/Source/cmLocalVisualStudioGenerator.cxx,v <-- cmLocalVisualStudioGenerator.cxx
new revision: 1.15; previous revision: 1.14
(0010153)
Brad King (manager)
2008-01-15 14:07

I'm re-opening this to add a relationship to a duplicate bug.
(0010154)
Brad King (manager)
2008-01-15 14:09

The patch Bill committed has been removed. The fix to bug 6150 works on all windows versions and was already committed.

 Issue History
Date Modified Username Field Change
2008-01-11 07:44 bullestock New Issue
2008-01-15 11:57 Bill Hoffman Note Added: 0010152
2008-01-15 11:57 Bill Hoffman Status new => closed
2008-01-15 11:57 Bill Hoffman Resolution open => fixed
2008-01-15 14:07 Brad King Assigned To => Brad King
2008-01-15 14:07 Brad King Status closed => feedback
2008-01-15 14:07 Brad King Resolution fixed => reopened
2008-01-15 14:07 Brad King Note Added: 0010153
2008-01-15 14:08 Brad King Relationship added duplicate of 0006150
2008-01-15 14:09 Brad King Status feedback => closed
2008-01-15 14:09 Brad King Note Added: 0010154
2008-01-15 14:09 Brad King Resolution reopened => fixed


Copyright © 2000 - 2018 MantisBT Team