BUG: Fix CMAKE_SHARED_*_LINK_*_C_FLAGS to pass link type selection flags directly to the linker.
This commit is contained in:
parent
5845843156
commit
e21b65cbb9
|
@ -90,7 +90,16 @@ ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
|
||||||
# building a shared library, shared module, or executable that links
|
# building a shared library, shared module, or executable that links
|
||||||
# to other libraries to select whether to use the static or shared
|
# to other libraries to select whether to use the static or shared
|
||||||
# versions of the libraries.
|
# versions of the libraries.
|
||||||
FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
|
FOREACH(type SHARED_LIBRARY SHARED_MODULE)
|
||||||
|
SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-a archive")
|
||||||
|
SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-a default")
|
||||||
|
ENDFOREACH(type)
|
||||||
|
FOREACH(type EXE)
|
||||||
SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-a,archive")
|
SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-a,archive")
|
||||||
SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-a,default")
|
SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-a,default")
|
||||||
ENDFOREACH(type)
|
ENDFOREACH(type)
|
||||||
|
FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
|
||||||
|
SET(CMAKE_${type}_LINK_STATIC_CXX_FLAGS "-Wl,-a,archive")
|
||||||
|
SET(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS "-Wl,-a,default")
|
||||||
|
ENDFOREACH(type)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue