Skip to content

Commit

Permalink
DONT MERGE
Browse files Browse the repository at this point in the history
  • Loading branch information
threeal committed May 30, 2024
1 parent b50610d commit 6aa21a2
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions cmake/Assertion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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")
Expand Down

0 comments on commit 6aa21a2

Please sign in to comment.