summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/SunOS.cmake26
1 files changed, 22 insertions, 4 deletions
diff --git a/Modules/Platform/SunOS.cmake b/Modules/Platform/SunOS.cmake
index 54cb637..aa1e933 100644
--- a/Modules/Platform/SunOS.cmake
+++ b/Modules/Platform/SunOS.cmake
@@ -76,7 +76,25 @@ ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
# building a shared library, shared module, or executable that links
# to other libraries to select whether to use the static or shared
# versions of the libraries.
-FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
- SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Bstatic")
- SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Bdynamic")
-ENDFOREACH(type)
+IF(CMAKE_COMPILER_IS_GNUCC)
+ FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
+ SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
+ SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
+ ENDFOREACH(type)
+ELSE(CMAKE_COMPILER_IS_GNUCC)
+ FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
+ SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Bstatic")
+ SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Bdynamic")
+ ENDFOREACH(type)
+ENDIF(CMAKE_COMPILER_IS_GNUCC)
+IF(CMAKE_COMPILER_IS_GNUCXX)
+ FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
+ SET(CMAKE_${type}_LINK_STATIC_CXX_FLAGS "-Wl,-Bstatic")
+ SET(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS "-Wl,-Bdynamic")
+ ENDFOREACH(type)
+ELSE(CMAKE_COMPILER_IS_GNUCXX)
+ FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
+ SET(CMAKE_${type}_LINK_STATIC_CXX_FLAGS "-Bstatic")
+ SET(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS "-Bdynamic")
+ ENDFOREACH(type)
+ENDIF(CMAKE_COMPILER_IS_GNUCXX)