AIX-XL.cmake 1.0 KB

12345678910111213141516171819202122232425262728
  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(__AIX_COMPILER_XL)
  5. return()
  6. endif()
  7. set(__AIX_COMPILER_XL 1)
  8. #
  9. # By default, runtime linking is enabled. All shared objects specified on the command line
  10. # will be listed, even if there are no symbols referenced, in the output file.
  11. string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " -Wl,-brtl")
  12. string(APPEND CMAKE_MODULE_LINKER_FLAGS_INIT " -Wl,-brtl")
  13. string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " -Wl,-brtl")
  14. macro(__aix_compiler_xl lang)
  15. set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:")
  16. set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
  17. set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-G -Wl,-bnoipath") # -shared
  18. set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-bexpall")
  19. set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS " ")
  20. set(CMAKE_SHARED_MODULE_${lang}_FLAGS " ")
  21. set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath")
  22. endmacro()