ProjectQueryBad.cmake 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # All of these should fail. Execution does continue though, so we should see
  2. # the error output from each one. There is no observable effect of the command
  3. # during the configure phase, so it isn't critical to end processing on the
  4. # first failure. Allowing execution to proceed may allow the project to see
  5. # other potential errors before ultimately halting. That behavior is generally
  6. # desirable, and the multiple failing calls here will confirm that we retain
  7. # that behavior.
  8. message(NOTICE "Non-query check")
  9. cmake_file_api(NOT_A_QUERY)
  10. message(NOTICE "Invalid API version checks")
  11. cmake_file_api(QUERY API_VERSION 2)
  12. cmake_file_api(QUERY API_VERSION nah)
  13. message(NOTICE "Invalid version numbers check")
  14. cmake_file_api(
  15. QUERY
  16. API_VERSION 1
  17. CODEMODEL nope
  18. CACHE -2
  19. CMAKEFILES .8
  20. TOOLCHAINS 2 0.1
  21. )
  22. message(NOTICE "Requested versions too high check")
  23. cmake_file_api(
  24. QUERY
  25. API_VERSION 1
  26. CODEMODEL 3
  27. CACHE 3
  28. CMAKEFILES 2
  29. TOOLCHAINS 1.1
  30. )
  31. message(NOTICE "Requested versions too low check")
  32. cmake_file_api(
  33. QUERY
  34. API_VERSION 1
  35. CODEMODEL 1
  36. CACHE 1
  37. )