mirror of
https://github.com/reactos/CMake.git
synced 2024-12-03 17:11:04 +00:00
e5ca59b456
Move failure cases from the CMake.{If,List,While,GetProperty} tests over to the RunCMake.{if,list,while,get_property} tests to use the more modern infrastructure. This also avoids using REGEX_ESCAPE_STRING to try to regex-match full paths.
17 lines
560 B
CMake
17 lines
560 B
CMake
get_property(FOO_BRIEF GLOBAL PROPERTY FOO BRIEF_DOCS)
|
|
get_property(FOO_FULL GLOBAL PROPERTY FOO FULL_DOCS)
|
|
|
|
if (NOT FOO_BRIEF STREQUAL "NOTFOUND")
|
|
message(SEND_ERROR "property FOO has BRIEF_DOCS set to '${FOO_BRIEF}'")
|
|
endif ()
|
|
|
|
if (NOT FOO_FULL STREQUAL "NOTFOUND")
|
|
message(SEND_ERROR "property FOO has FULL_DOCS set to '${FOO_FULL}'")
|
|
endif ()
|
|
|
|
set(test_var alpha)
|
|
get_property(result VARIABLE PROPERTY test_var)
|
|
if(NOT result STREQUAL "alpha")
|
|
message(SEND_ERROR "bad value of VARIABLE PROPERTY test_var: got '${result}' instead of 'alpha'")
|
|
endif()
|