summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/execute_process/LastCommandError.cmake
diff options
context:
space:
mode:
authorAsit Dhal <dhal.asitk@gmail.com>2020-09-20 02:29:53 (GMT)
committerAsit Dhal <dhal.asitk@gmail.com>2020-10-01 15:07:44 (GMT)
commit116a427eb1aa7e603a80a50486c08cd0dd16d7dd (patch)
treec0a83c7d054b77110fcc77af694d63a6ef0672d7 /Tests/RunCMake/execute_process/LastCommandError.cmake
parent47b569a85852f716b05ede538e9940392407316c (diff)
downloadCMake-116a427eb1aa7e603a80a50486c08cd0dd16d7dd.zip
CMake-116a427eb1aa7e603a80a50486c08cd0dd16d7dd.tar.gz
CMake-116a427eb1aa7e603a80a50486c08cd0dd16d7dd.tar.bz2
execute_process: add options for fatal errors on subprocess failure
Fixes: #19930
Diffstat (limited to 'Tests/RunCMake/execute_process/LastCommandError.cmake')
-rw-r--r--Tests/RunCMake/execute_process/LastCommandError.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/execute_process/LastCommandError.cmake b/Tests/RunCMake/execute_process/LastCommandError.cmake
new file mode 100644
index 0000000..6116a5c
--- /dev/null
+++ b/Tests/RunCMake/execute_process/LastCommandError.cmake
@@ -0,0 +1,8 @@
+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
+)