diff options
Diffstat (limited to 'Tests/RunCMake/CMP0054/CMP0054-keywords-NEW.cmake')
-rw-r--r-- | Tests/RunCMake/CMP0054/CMP0054-keywords-NEW.cmake | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0054/CMP0054-keywords-NEW.cmake b/Tests/RunCMake/CMP0054/CMP0054-keywords-NEW.cmake new file mode 100644 index 0000000..b957658 --- /dev/null +++ b/Tests/RunCMake/CMP0054/CMP0054-keywords-NEW.cmake @@ -0,0 +1,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() |