diff options
author | Brad King <brad.king@kitware.com> | 2010-06-07 18:23:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-06-07 18:23:45 (GMT) |
commit | a03e85f13c1e1e649eae7db62c500b7ec0b692ae (patch) | |
tree | c38d2b27d92068e44905e5919a0efae1ac773864 /Source | |
parent | 79f01660c922db5683a65c4c1efbc767dc817b6b (diff) | |
parent | 29383b4b85fc0f728a166a9d4e8abf123f862212 (diff) | |
download | CMake-a03e85f13c1e1e649eae7db62c500b7ec0b692ae.zip CMake-a03e85f13c1e1e649eae7db62c500b7ec0b692ae.tar.gz CMake-a03e85f13c1e1e649eae7db62c500b7ec0b692ae.tar.bz2 |
Merge branch 'add-git-to-ExternalProject'
Conflicts:
Modules/ExternalProject.cmake
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index fce5a9c..004d19a 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -973,6 +973,24 @@ cmLocalUnixMakefileGenerator3 this->ConfigurationName.c_str()); if (cmd.size()) { + // Use "call " before any invocations of .bat or .cmd files + // invoked as custom commands in the WindowsShell. + // + bool useCall = false; + + if (this->WindowsShell) + { + std::string suffix; + if (cmd.size() > 4) + { + suffix = cmSystemTools::LowerCase(cmd.substr(cmd.size()-4)); + if (suffix == ".bat" || suffix == ".cmd") + { + useCall = true; + } + } + } + cmSystemTools::ReplaceString(cmd, "/./", "/"); // Convert the command to a relative path only if the current // working directory will be the start-output directory. @@ -1044,6 +1062,10 @@ cmLocalUnixMakefileGenerator3 } } } + if (useCall && launcher.empty()) + { + cmd = "call " + cmd; + } commands1.push_back(cmd); } } |