mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-23 08:18:37 -05:00
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.
This commit is contained in:
@@ -139,10 +139,20 @@ cmLocalVisualStudioGenerator
|
|||||||
std::string script;
|
std::string script;
|
||||||
if(workingDirectory)
|
if(workingDirectory)
|
||||||
{
|
{
|
||||||
|
// Change the working directory.
|
||||||
script += newline;
|
script += newline;
|
||||||
newline = newline_text;
|
newline = newline_text;
|
||||||
script += "cd ";
|
script += "cd ";
|
||||||
script += this->Convert(workingDirectory, START_OUTPUT, SHELL);
|
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
|
// for visual studio IDE add extra stuff to the PATH
|
||||||
// if CMAKE_MSVCIDE_RUN_PATH is set.
|
// if CMAKE_MSVCIDE_RUN_PATH is set.
|
||||||
|
|||||||
Reference in New Issue
Block a user