1 # Linux sun studio c options
2 SET(CMAKE_DL_LIBS "dl")
3 SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-KPIC")
4 SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G")
5 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
6 SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-R")
7 SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
8 SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-h")
9 SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
11 SET(CMAKE_C_FLAGS_INIT "")
12 SET(CMAKE_C_FLAGS_DEBUG_INIT "-g")
13 SET(CMAKE_C_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
14 SET(CMAKE_C_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
15 SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
17 # Initialize C link type selection flags. These flags are used when
18 # building a shared library, shared module, or executable that links
19 # to other libraries to select whether to use the static or shared
20 # versions of the libraries.
21 FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
22 SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Bstatic")
23 SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Bdynamic")