SunOS-PathScale.cmake 770 B

123456789101112131415161718192021
  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_PATHSCALE)
  5. return()
  6. endif()
  7. set(__SUNOS_COMPILER_PATHSCALE 1)
  8. macro(__sunos_compiler_pathscale lang)
  9. # Shared library compile and link flags.
  10. set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC")
  11. set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
  12. set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
  13. set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
  14. set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-R")
  15. set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
  16. set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,-h")
  17. endmacro()