aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-09-24 13:40:57 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-09-24 13:40:57 +0100
commit37336d8d4ecdebf94bf0cb47f844d98657cb842b (patch)
tree6798ddf1c8012b04b274cf580546c62e9836e83b
parentaf9bb113035940d46b2369521ef27d5e20f37644 (diff)
downloadrspamd-37336d8d4ecdebf94bf0cb47f844d98657cb842b.tar.gz
rspamd-37336d8d4ecdebf94bf0cb47f844d98657cb842b.zip
Improve compiler flags handling.
-rw-r--r--CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f0a6954e2..756792089 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}")