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.
cmake/Tests/RunCMake/if/IncompleteMatches.cmake

37 lines
650 B

if(MATCHES)
message(SEND_ERROR "Test #1 failed")
else()
message(STATUS "Test #1 passed")
endif()
if("" MATCHES "")
message(STATUS "Test #2 passed")
else()
message(SEND_ERROR "Test #2 failed")
endif()
if(MATCHES RHS)
message(SEND_ERROR "Test #3 failed")
else()
message(STATUS "Test #3 passed")
endif()
set(RHS "")
if(MATCHES RHS)
message(SEND_ERROR "Test #4 failed")
else()
message(STATUS "Test #4 passed")
endif()
if(MATCHES "^$")
message(SEND_ERROR "Test #5 failed")
else()
message(STATUS "Test #5 passed")
endif()
if("" MATCHES "^$")
message(STATUS "Test #6 passed")
else()
message(SEND_ERROR "Test #6 failed")
endif()