Back to home page

EIC code displayed by LXR

 
 

    


Warning, /acts/cmake/assert_check/RunAssertProbe.cmake is written in an unsupported language. File is not indexed.

0001 # Run an assertion probe and check that it died on a failed assertion. CTest
0002 # reports a test killed by a signal as failed regardless of its output, so the
0003 # probe cannot be registered directly.
0004 #
0005 #   cmake -DPROBE=<executable> -P RunAssertProbe.cmake
0006 
0007 execute_process(
0008     COMMAND ${PROBE}
0009     RESULT_VARIABLE _result
0010     OUTPUT_VARIABLE _output
0011     ERROR_VARIABLE _output
0012 )
0013 message("${_output}")
0014 
0015 if("${_result}" STREQUAL "77")
0016     message("ACTS_ASSERTION_PROBE_SKIPPED")
0017 elseif("${_result}" STREQUAL "0")
0018     message(FATAL_ERROR "${PROBE} exited normally, assertions are not enabled")
0019 elseif(NOT _output MATCHES "Assertion.*failed")
0020     message(
0021         FATAL_ERROR
0022         "${PROBE} failed (${_result}) without an assertion message"
0023     )
0024 endif()