diff options
author | David Cole <david.cole@kitware.com> | 2011-11-22 21:23:23 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-11-22 21:23:23 (GMT) |
commit | 636740c478068685727ffe03f6e469418ca42282 (patch) | |
tree | 2c5b7bf3e61e71045a1fe39f525c4226f1fc55aa /Source | |
parent | e8fc3bc8d04c8cf64f4c7ed3816126777925660b (diff) | |
parent | 46c70540ede37c5f2ebeeeba4178340abf92fadb (diff) | |
download | CMake-636740c478068685727ffe03f6e469418ca42282.zip CMake-636740c478068685727ffe03f6e469418ca42282.tar.gz CMake-636740c478068685727ffe03f6e469418ca42282.tar.bz2 |
Merge topic 'fix-12445-add-call-for-batch-files-vs10'
46c7054 VS: Use "call " keyword with .cmd and .bat file custom commands (#12445)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalVisualStudioGenerator.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index 4d16409..de1ac30 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -250,6 +250,20 @@ cmLocalVisualStudioGenerator // Add this command line. std::string cmd = ccg.GetCommand(c); + + // Use "call " before any invocations of .bat or .cmd files + // invoked as custom commands. + // + std::string suffix; + if (cmd.size() > 4) + { + suffix = cmSystemTools::LowerCase(cmd.substr(cmd.size()-4)); + if (suffix == ".bat" || suffix == ".cmd") + { + script += "call "; + } + } + script += this->Convert(cmd.c_str(), relativeRoot, SHELL); ccg.AppendArguments(c, script); |