summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FileAPI/ProjectQueryBad.cmake
blob: 3a06105d2a5ff9c41b59e53f5b1c2f784db27d76 (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
37
38
39
40
41
42
# All of these should fail. Execution does continue though, so we should see
# the error output from each one. There is no observable effect of the command
# during the configure phase, so it isn't critical to end processing on the
# first failure. Allowing execution to proceed may allow the project to see
# other potential errors before ultimately halting. That behavior is generally
# desirable, and the multiple failing calls here will confirm that we retain
# that behavior.

message(NOTICE "Non-query check")
cmake_file_api(NOT_A_QUERY)

message(NOTICE "Invalid API version checks")
cmake_file_api(QUERY API_VERSION 2)
cmake_file_api(QUERY API_VERSION nah)

message(NOTICE "Invalid version numbers check")
cmake_file_api(
  QUERY
  API_VERSION 1
  CODEMODEL nope
  CACHE -2
  CMAKEFILES .8
  TOOLCHAINS 2 0.1
)

message(NOTICE "Requested versions too high check")
cmake_file_api(
  QUERY
  API_VERSION 1
  CODEMODEL 3
  CACHE 3
  CMAKEFILES 2
  TOOLCHAINS 1.1
)

message(NOTICE "Requested versions too low check")
cmake_file_api(
  QUERY
  API_VERSION 1
  CODEMODEL 1
  CACHE 1
)