XL-C.cmake 973 B

1234567891011121314151617181920212223
  1. include(Compiler/XL)
  2. __compiler_xl(C)
  3. string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG")
  4. string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
  5. # -qthreaded = Ensures that all optimizations will be thread-safe
  6. string(APPEND CMAKE_C_FLAGS_INIT " -qthreaded")
  7. if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10.1)
  8. set(CMAKE_C90_STANDARD_COMPILE_OPTION "-qlanglvl=stdc89")
  9. set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-qlanglvl=extc89")
  10. set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
  11. set(CMAKE_C99_STANDARD_COMPILE_OPTION "-qlanglvl=stdc99")
  12. set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-qlanglvl=extc99")
  13. set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
  14. if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.1)
  15. set(CMAKE_C11_STANDARD_COMPILE_OPTION "-qlanglvl=extc1x")
  16. set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-qlanglvl=extc1x")
  17. set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
  18. endif ()
  19. endif()
  20. __compiler_check_default_language_standard(C 10.1 90 11.1 99)