You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
486 B
26 lines
486 B
10 years ago
|
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()
|