diff options
author | Brad King <brad.king@kitware.com> | 2013-05-16 18:37:09 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-05-16 18:37:09 (GMT) |
commit | 8ec007083ed2cc96c7296d2e8b9ac62be84df859 (patch) | |
tree | 4a7e243a98a5fb130e7a43a21b862a81d28c74a7 /Source | |
parent | e778522161cf089bae58b16611d513a99ddcf3ef (diff) | |
parent | e7c58f6c35d110a43c483a796fef644c6e22ce89 (diff) | |
download | CMake-8ec007083ed2cc96c7296d2e8b9ac62be84df859.zip CMake-8ec007083ed2cc96c7296d2e8b9ac62be84df859.tar.gz CMake-8ec007083ed2cc96c7296d2e8b9ac62be84df859.tar.bz2 |
Merge topic 'ninja_add_custom_command_windows'
e7c58f6 Ninja: use cd /D to set directory on Windows
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index d902f4e..294a539 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -302,7 +302,12 @@ void cmLocalNinjaGenerator::AppendCustomCommandLines(const cmCustomCommand *cc, wd = this->GetMakefile()->GetStartOutputDirectory(); cmOStringStream cdCmd; - cdCmd << "cd " << this->ConvertToOutputFormat(wd, SHELL); +#ifdef _WIN32 + std::string cdStr = "cd /D "; +#else + std::string cdStr = "cd "; +#endif + cdCmd << cdStr << this->ConvertToOutputFormat(wd, SHELL); cmdLines.push_back(cdCmd.str()); } for (unsigned i = 0; i != ccg.GetNumberOfCommands(); ++i) { |