summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx10
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.