From 803fde1b137899ad5cf4102989a49b993daa88d5 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 19 Dec 2013 18:12:05 +0000 Subject: [PATCH] Do not link unneeded libraries if possible. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) 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") -- 2.39.5