blob: b957658b01217f09fed51d749879dfa729f6532a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
cmake_policy(SET CMP0054 NEW)
function(assert KEYWORD)
if("${KEYWORD}" STREQUAL "${KEYWORD}")
else()
message(FATAL_ERROR
"Assertion failed [\"${KEYWORD}\" STREQUAL \"${KEYWORD}\"]")
endif()
endfunction()
assert("NOT")
assert("COMMAND")
assert("POLICY")
assert("TARGET")
assert("EXISTS")
assert("IS_DIRECTORY")
assert("IS_SYMLINK")
assert("IS_ABSOLUTE")
assert("DEFINED")
assert("(")
assert(")")
if("NOT" 1)
message(FATAL_ERROR "[\"NOT\" 1] evaluated true")
endif()
|