execute_process(): Add FATAL_ERROR_ON_FAILURE option
Often times, we don't want to proceed with script processing if an execute_process()
call has a non-zero exit code. Therefore, we often have to do something like the following:
execute_process(COMMAND foo RESULT_VARIABLE _result)
if(_result)
message(FATAL_ERROR "foo returned ${_result}, should be 0")
endif()
It would be nice to do something roughly equivalent to bash's set -e
to do this automatically:
execute_process(COMMAND foo FATAL_ERROR_ON_FAILURE)
Edited by Kyle Edwards