check-part1.cmake 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. include(${CMAKE_CURRENT_LIST_DIR}/check-common.cmake)
  2. message(STATUS "config=[${config}]")
  3. check(config "${short_config}")
  4. check(test_0 "")
  5. check(test_0_with_comma "")
  6. check(test_1 "content")
  7. check(test_1_with_comma "-Wl,--no-undefined")
  8. check(test_and_0 "0")
  9. check(test_and_0_0 "0")
  10. check(test_and_0_1 "0")
  11. check(test_and_1 "1")
  12. check(test_and_1_0 "0")
  13. check(test_and_1_1 "1")
  14. check(test_and_0_invalidcontent "0")
  15. check(test_config_0 "0")
  16. check(test_config_1 "1")
  17. foreach(c debug release relwithdebinfo minsizerel)
  18. if(NOT "${test_config_${c}}" MATCHES "^(0+|1+)$")
  19. message(SEND_ERROR "test_config_${c} is \"${test_config_${c}}\", not all 0 or all 1")
  20. endif()
  21. endforeach()
  22. check(test_not_0 "1")
  23. check(test_not_1 "0")
  24. check(test_or_0 "0")
  25. check(test_or_0_0 "0")
  26. check(test_or_0_1 "1")
  27. check(test_or_1 "1")
  28. check(test_or_1_0 "1")
  29. check(test_or_1_1 "1")
  30. check(test_or_1_invalidcontent "1")
  31. check(test_bool_notfound "0")
  32. check(test_bool_foo_notfound "0")
  33. check(test_bool_true "1")
  34. check(test_bool_false "0")
  35. check(test_bool_on "1")
  36. check(test_bool_off "0")
  37. check(test_bool_no "0")
  38. check(test_bool_n "0")
  39. check(test_bool_empty "0")
  40. check(test_strequal_yes_yes "1")
  41. check(test_strequal_yes_yes_cs "0")
  42. check(test_strequal_yes_no "0")
  43. check(test_strequal_no_yes "0")
  44. check(test_strequal_angle_r "1")
  45. check(test_strequal_comma "1")
  46. check(test_strequal_semicolon "1")
  47. check(test_strequal_angle_r_comma "0")
  48. check(test_strequal_both_empty "1")
  49. check(test_strequal_one_empty "0")
  50. check(test_angle_r ">")
  51. check(test_comma ",")
  52. check(test_semicolon ";")
  53. check(test_colons_1 ":")
  54. check(test_colons_2 "::")
  55. check(test_colons_3 "Qt5::Core")
  56. check(test_colons_4 [[C:\CMake]])
  57. check(test_colons_5 "C:/CMake")