summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/if/IncompleteMatches.cmake
blob: 7142cfc3271b6e1a896a59455198e46f468f7475 (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
26
27
28
29
30
31
32
33
34
35
36
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()