XL.cmake 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. # This module is shared by multiple languages; use include blocker.
  4. if(__COMPILER_XL)
  5. return()
  6. endif()
  7. set(__COMPILER_XL 1)
  8. include(Compiler/CMakeCommonCompilerMacros)
  9. macro(__compiler_xl lang)
  10. # Feature flags.
  11. set(CMAKE_${lang}_VERBOSE_FLAG "-V")
  12. set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-qpic")
  13. set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-qpic")
  14. set(CMAKE_${lang}_RESPONSE_FILE_FLAG "-qoptfile=")
  15. set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-qoptfile=")
  16. set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-qmkshrobj")
  17. set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Wl,")
  18. set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP ",")
  19. string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
  20. string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O")
  21. string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -O")
  22. string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -g")
  23. set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
  24. set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
  25. set(CMAKE_DEPFILE_FLAGS_${lang} "-MF <DEPFILE> -qmakedep=gcc")
  26. endmacro()