diff options
Diffstat (limited to 'Tests/RunCMake/execute_process/LastCommandError.cmake')
-rw-r--r-- | Tests/RunCMake/execute_process/LastCommandError.cmake | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Tests/RunCMake/execute_process/LastCommandError.cmake b/Tests/RunCMake/execute_process/LastCommandError.cmake index 6116a5c..9a925fe 100644 --- a/Tests/RunCMake/execute_process/LastCommandError.cmake +++ b/Tests/RunCMake/execute_process/LastCommandError.cmake @@ -1,8 +1,19 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E true + COMMAND ${CMAKE_COMMAND} -E false + COMMAND ${CMAKE_COMMAND} -E false + COMMAND ${CMAKE_COMMAND} -E false + COMMAND ${CMAKE_COMMAND} -E true + COMMAND ${CMAKE_COMMAND} -E false + RESULT_VARIABLE result +) + +if(NOT result EQUAL "0") + execute_process(COMMAND ${CMAKE_COMMAND} -E true COMMAND ${CMAKE_COMMAND} -E false COMMAND ${CMAKE_COMMAND} -E false COMMAND ${CMAKE_COMMAND} -E false COMMAND ${CMAKE_COMMAND} -E true COMMAND ${CMAKE_COMMAND} -E false COMMAND_ERROR_IS_FATAL LAST -) + ) +endif() |