diff options
author | Brad King <brad.king@kitware.com> | 2015-05-21 13:03:57 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-05-21 13:03:57 (GMT) |
commit | 3541fc73a12a52f87a2faa9790a65651658162d8 (patch) | |
tree | c6fd6d4835fbe5c517b3187ba7ba0796c4d9f5f9 /Modules | |
parent | 26a04a684403b9d0d8a478a1ff8ec6f0fc404cb2 (diff) | |
parent | a0d620de829b09c0edf594b2578cfa47e855f695 (diff) | |
download | CMake-3541fc73a12a52f87a2faa9790a65651658162d8.zip CMake-3541fc73a12a52f87a2faa9790a65651658162d8.tar.gz CMake-3541fc73a12a52f87a2faa9790a65651658162d8.tar.bz2 |
Merge topic 'ExternalProject_FixLog'
a0d620de ExternalProject: Fix log when the first arg of commands is "COMMAND" (#15567)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/ExternalProject.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 7cf9d79..11a24b8 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1282,7 +1282,7 @@ endif() # Wrap multiple 'COMMAND' lines up into a second-level wrapper # script so all output can be sent to one log file. - if(command MATCHES ";COMMAND;") + if(command MATCHES "(^|;)COMMAND;") set(code_execute_process " ${code_cygpath_make} execute_process(COMMAND \${command} RESULT_VARIABLE result) @@ -1299,7 +1299,9 @@ endif() set(sep "") foreach(arg IN LISTS command) if("x${arg}" STREQUAL "xCOMMAND") - set(code "${code}set(command \"${cmd}\")${code_execute_process}") + if(NOT "x${cmd}" STREQUAL "x") + set(code "${code}set(command \"${cmd}\")${code_execute_process}") + endif() set(cmd "") set(sep "") else() |