Linux-SunPro-CXX.cmake 1.0 KB

123456789101112131415161718192021222324
  1. # Linux sun studio c++ options
  2. SET(CMAKE_DL_LIBS "dl")
  3. SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-KPIC")
  4. SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-G")
  5. SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
  6. SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-R")
  7. SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":")
  8. SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-h")
  9. SET(CMAKE_EXE_EXPORTS_CXX_FLAG "--export-dynamic")
  10. SET(CMAKE_CXX_FLAGS_INIT "")
  11. SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
  12. SET(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
  13. SET(CMAKE_CXX_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
  14. SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
  15. # Initialize C link type selection flags. These flags are used when
  16. # building a shared library, shared module, or executable that links
  17. # to other libraries to select whether to use the static or shared
  18. # versions of the libraries.
  19. FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
  20. SET(CMAKE_${type}_LINK_STATIC_CXX_FLAGS "-Bstatic")
  21. SET(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS "-Bdynamic")
  22. ENDFOREACH(type)