diff options
author | Brad King <brad.king@kitware.com> | 2007-12-17 23:38:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-12-17 23:38:19 (GMT) |
commit | abaa0267210811b4aa1d20a590a56e525b67e40a (patch) | |
tree | 21e9879b7cf5a12a03396de911e93e2382febe5c /Source/cmLocalVisualStudioGenerator.cxx | |
parent | 0e33a166a390b4e04d5e66fd9e24fa5de05410d6 (diff) | |
download | CMake-abaa0267210811b4aa1d20a590a56e525b67e40a.zip CMake-abaa0267210811b4aa1d20a590a56e525b67e40a.tar.gz CMake-abaa0267210811b4aa1d20a590a56e525b67e40a.tar.bz2 |
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.
Diffstat (limited to 'Source/cmLocalVisualStudioGenerator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudioGenerator.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
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. |