SunOS-GNU.cmake 996 B

12345678910111213141516171819202122232425
  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_RPATH_ORIGIN_TOKEN "\$ORIGIN")
  12. set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,-h")
  13. # Initialize C link type selection flags. These flags are used when
  14. # building a shared library, shared module, or executable that links
  15. # to other libraries to select whether to use the static or shared
  16. # versions of the libraries.
  17. foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
  18. set(CMAKE_${type}_LINK_STATIC_${lang}_FLAGS "-Wl,-Bstatic")
  19. set(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Wl,-Bdynamic")
  20. endforeach()
  21. endmacro()