Skip to content

Commit

Permalink
DONT MERGE
Browse files Browse the repository at this point in the history
  • Loading branch information
threeal committed May 16, 2024
1 parent efb0435 commit 8cc8b23
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cmake/Assertion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ function(assert_not_directory PATH)
endif()
endfunction()

# Asserts whether the given string matches the given regular expression pattern.
#
# Arguments:
# - STRING: The string to assert.
# - PATTERN: The regular expression pattern to match with the string.
function(assert_strequal STRING PATTERN)
if(NOT "${STRING}" MATCHES "${PATTERN}")
message(FATAL_ERROR "expected string '${STRING}' to match with '${PATTERN}'")
endif()
endfunction()

# Asserts whether the given strings are equal.
#
# Arguments:
Expand Down

0 comments on commit 8cc8b23

Please sign in to comment.