BUG: Need -Wl, to pass linker flags when using gcc on Sun.
This commit is contained in:
parent
0a4e2020b5
commit
147b4ff102
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue