File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -215,6 +215,14 @@ if(CMD)
215215 else ()
216216 execute_process (COMMAND ${_cmd} ${_out} ${_err} ${_cwd} RESULT_VARIABLE _rc )
217217
218+ # Helper: pretty-print the command
219+ function (print_command _label )
220+ message (STATUS "${_label} " )
221+ foreach (arg IN LISTS _cmd _out _err _cwd)
222+ message (STATUS " [${arg} ]" )
223+ endforeach ()
224+ endfunction ()
225+
218226 if (_rc STREQUAL "Segmentation fault" OR _rc EQUAL 11)
219227 message (STATUS "Got ${_rc} , retrying again once more... with coredump enabled" )
220228 string (REPLACE ";" " " _cmd_str "${_cmd} " )
@@ -227,8 +235,10 @@ ${_cmd_str}
227235 endif ()
228236
229237 if (DEFINED RC AND (NOT _rc EQUAL RC))
238+ print_command ("Command failed:" )
230239 message (FATAL_ERROR "error code: ${_rc} " )
231240 elseif (NOT DEFINED RC AND _rc)
241+ print_command ("Command failed:" )
232242 message (FATAL_ERROR "error code: ${_rc} " )
233243 endif ()
234244 endif ()
You can’t perform that action at this time.
0 commit comments