feat(CMakeLists): add flag suggested by Soonho

closes #557
This commit is contained in:
Leonardo de Moura 2015-04-29 16:31:03 -07:00
parent d6d30f12c6
commit c19ec664b8

View file

@ -88,6 +88,9 @@ endif()
if("${STATIC}" MATCHES "ON")
message(STATUS "Creating a static executable")
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(LEAN_EXTRA_LINKER_FLAGS "${LEAN_EXTRA_LINKER_FLAGS} -Wl,--whole-archive -lpthread -Wl,--no-whole-archive")
endif()
set(LEAN_EXTRA_LINKER_FLAGS "${LEAN_EXTRA_LINKER_FLAGS} -static")
endif()