diff --git a/cmake/Assertion.cmake b/cmake/Assertion.cmake index 7855586..1f3d34a 100644 --- a/cmake/Assertion.cmake +++ b/cmake/Assertion.cmake @@ -294,13 +294,6 @@ endmacro() # - ARG2: The third argument. # - ARG3: The fourth argument. macro(_assert_internal_assert_4 ARG0 ARG1 ARG2 ARG3) - if("${ARG0}" STREQUAL NOT) - _assert_internal_assert_3_not("${ARG1}" "${ARG2}" "${ARG3}") - else() - _assert_internal_format_message( - MESSAGE "unsupported condition:" "${ARG0} ${ARG1} ${ARG2} ${ARG3}") - message(FATAL_ERROR "${MESSAGE}") - endif() endmacro() # Asserts the given condition. @@ -320,7 +313,13 @@ function(assert) elseif(ARGC EQUAL 3) _assert_internal_assert_3("${ARGV0}" "${ARGV1}" "${ARGV2}") elseif(ARGC EQUAL 4) - _assert_internal_assert_4("${ARGV0}" "${ARGV1}" "${ARGV2}" "${ARGV3}") + if("${ARGV0}" STREQUAL NOT) + _assert_internal_assert_3_not("${ARGV1}" "${ARGV2}" "${ARGV3}") + else() + _assert_internal_format_message( + MESSAGE "unsupported condition:" "${ARGV0} ${ARGV1} ${ARGV2} ${ARGV3}") + message(FATAL_ERROR "${MESSAGE}") + endif() else() set(ARGS "${ARGV0} ${ARGV1} ${ARGV2} ${ARGV3}") math(EXPR STOP "${ARGC} - 1")