]> source.dussan.org Git - rspamd.git/commitdiff
Improve compiler flags handling.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 24 Sep 2013 12:40:57 +0000 (13:40 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 24 Sep 2013 12:40:57 +0000 (13:40 +0100)
CMakeLists.txt

index f0a6954e2b2911ef028d128e5e3ef5670ef7c92f..75679208959e7ffe2a2a78883698e69d772aeceb 100644 (file)
@@ -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}")