From abaa0267210811b4aa1d20a590a56e525b67e40a Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 17 Dec 2007 18:38:19 -0500 Subject: 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. --- Source/cmLocalVisualStudioGenerator.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index 53decdf..1cae2f7 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -139,10 +139,20 @@ cmLocalVisualStudioGenerator 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. -- cgit v0.12