From: Vsevolod Stakhov Date: Thu, 19 Dec 2013 18:12:05 +0000 (+0000) Subject: Do not link unneeded libraries if possible. X-Git-Tag: 0.6.5~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=803fde1b137899ad5cf4102989a49b993daa88d5;p=rspamd.git Do not link unneeded libraries if possible. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 87002f373..0c59a42b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -334,6 +334,7 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") ELSE(EXISTS "/etc/debian_version") SET(LINUX_START_SCRIPT "rspamd_rh.in") ENDIF(EXISTS "/etc/debian_version") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed") ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")