1# Distributed under the OSI-approved BSD 3-Clause License. See accompanying 2# file Copyright.txt or https://cmake.org/licensing for details. 3 4 5# This module is shared by multiple languages; use include blocker. 6if(__SUNOS_COMPILER_PATHSCALE) 7 return() 8endif() 9set(__SUNOS_COMPILER_PATHSCALE 1) 10 11macro(__sunos_compiler_pathscale lang) 12 # Shared library compile and link flags. 13 set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC") 14 set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE") 15 set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC") 16 set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared") 17 18 set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-R") 19 set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") 20 set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,-h") 21endmacro() 22