check-part3.cmake 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. include(${CMAKE_CURRENT_LIST_DIR}/check-common.cmake)
  2. check(test_version_greater_1 "0")
  3. check(test_version_greater_2 "1")
  4. check(test_version_less_1 "0")
  5. check(test_version_less_2 "1")
  6. check(test_version_equal_1 "0")
  7. check(test_version_equal_2 "1")
  8. foreach(c debug release relwithdebinfo minsizerel)
  9. if(config AND NOT config STREQUAL NoConfig)
  10. if(NOT "${test_imported_${c}}" MATCHES "^;/imported2/include$"
  11. AND NOT "${test_imported_${c}}" MATCHES "^/imported1/include;$")
  12. message(SEND_ERROR "test_imported_${c} is not correct: ${test_imported_${c}}")
  13. endif()
  14. else()
  15. if(NOT "${test_imported_${c}}" MATCHES "^;$")
  16. message(SEND_ERROR "test_imported_${c} is not an empty list: ${test_imported_${c}}")
  17. endif()
  18. endif()
  19. endforeach()
  20. check(test_alias_file_exe "1")
  21. check(test_alias_file_lib "1")
  22. check(test_alias_target_name "1")
  23. check(test_early_termination_1 "$<:")
  24. check(test_early_termination_2 "$<:,")
  25. check(test_platform_id "${system_name}")
  26. foreach(system Linux Windows Darwin)
  27. if(system_name STREQUAL system)
  28. check(test_platform_id_${system} 1)
  29. else()
  30. check(test_platform_id_${system} 0)
  31. endif()
  32. endforeach()
  33. check(lower_case "mi,xed")
  34. check(upper_case "MIX,ED")
  35. check(make_c_identifier "_4f_oo__bar__")