SunOS-GNU.cmake 938 B

123456789101112131415161718192021222324
  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(__SUNOS_COMPILER_GNU)
  5. return()
  6. endif()
  7. set(__SUNOS_COMPILER_GNU 1)
  8. macro(__sunos_compiler_gnu lang)
  9. set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-R")
  10. set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
  11. set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,-h")
  12. # Initialize C link type selection flags. These flags are used when
  13. # building a shared library, shared module, or executable that links
  14. # to other libraries to select whether to use the static or shared
  15. # versions of the libraries.
  16. foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
  17. set(CMAKE_${type}_LINK_STATIC_${lang}_FLAGS "-Wl,-Bstatic")
  18. set(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Wl,-Bdynamic")
  19. endforeach()
  20. endmacro()