From: Vsevolod Stakhov Date: Tue, 24 Sep 2013 12:40:57 +0000 (+0100) Subject: Improve compiler flags handling. X-Git-Tag: 0.6.0~170 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37336d8d4ecdebf94bf0cb47f844d98657cb842b;p=thirdparty%2Frspamd.git Improve compiler flags handling. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index f0a6954e2b..7567920895 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -831,11 +831,11 @@ ENDIF(SUPPORT_STD_FLAG) CHECK_C_COMPILER_FLAG(-fPIC SUPPORT_FPIC) IF(SUPPORT_FPIC) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_C_FLAGS} -fPIC") ENDIF(SUPPORT_FPIC) CHECK_C_COMPILER_FLAG(-fpic SUPPORT_Fpic) IF(SUPPORT_Fpic) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic") + SET(CMAKE_EXE_LINKER_FLAGS"${CMAKE_C_FLAGS} -fpic") ENDIF(SUPPORT_Fpic) # Optimization flags @@ -848,7 +848,7 @@ IF(NOT CMAKE_C_OPT_FLAGS) ENDIF(NOT CMAKE_C_OPT_FLAGS) IF(DEBUG_MODE MATCHES "ON") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g") + SET(CMAKE_BUILD_TYPE "Debug") ENDIF(DEBUG_MODE MATCHES "ON") SET(CMAKE_C_FLAGS "${CMAKE_C_OPT_FLAGS} ${CMAKE_C_FLAGS} ${CMAKE_C_WARN_FLAGS}")