diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-06-05 20:52:41 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-06-05 20:52:41 +0400 |
commit | 8a6fa6ab3b3807d525967f08e8178f168237eeda (patch) | |
tree | b81ab87319409c75bb2327829ebe1cffdde42009 /CMakeLists.txt | |
parent | ee97d0365907a159901c3cb47f9e4a2f5bdd61d6 (diff) | |
download | rspamd-8a6fa6ab3b3807d525967f08e8178f168237eeda.tar.gz rspamd-8a6fa6ab3b3807d525967f08e8178f168237eeda.zip |
Strict prototypes.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 07b8f228f..3279b761f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -655,12 +655,13 @@ ENDIF(LIBUTIL_LIBRARY) # Process with warn flags SET(CMAKE_C_WARN_FLAGS "") CHECK_C_COMPILER_FLAG(-Wall SUPPORT_WALL) -CHECK_C_COMPILER_FLAG(-Wall SUPPORT_W) +CHECK_C_COMPILER_FLAG(-W SUPPORT_W) CHECK_C_COMPILER_FLAG(-Wpointer-arith SUPPORT_WPOINTER) CHECK_C_COMPILER_FLAG(-Wno-unused-parameter SUPPORT_WPARAM) CHECK_C_COMPILER_FLAG(-Wno-unused-function SUPPORT_WFUNCTION) CHECK_C_COMPILER_FLAG(-Wunused-variable SUPPORT_WUNUSED_VAR) CHECK_C_COMPILER_FLAG(-Wno-pointer-sign SUPPORT_WPOINTER_SIGN) +CHECK_C_COMPILER_FLAG(-Wstrict-prototypes SUPPORT_WSTRICT_PROTOTYPES) CHECK_C_COMPILER_FLAG(-pedantic SUPPORT_PEDANTIC_FLAG) CHECK_C_COMPILER_FLAG("-std=c99" SUPPORT_STD_FLAG) IF(SUPPORT_W) @@ -684,6 +685,9 @@ ENDIF(SUPPORT_WUNUSED_VAR) IF(SUPPORT_WPOINTER_SIGN) SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-pointer-sign") ENDIF(SUPPORT_WPOINTER_SIGN) +IF(SUPPORT_WSTRICT_PROTOTYPES) + SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wstrict-prototypes") +ENDIF(SUPPORT_WSTRICT_PROTOTYPES) IF(SUPPORT_PEDANTIC_FLAG) SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -pedantic") ENDIF(SUPPORT_PEDANTIC_FLAG) @@ -694,9 +698,9 @@ ENDIF(SUPPORT_STD_FLAG) # Optimization flags IF(NOT CMAKE_C_OPT_FLAGS) IF(ENABLE_OPTIMIZATION MATCHES "ON") - SET(CMAKE_C_OPT_FLAGS "-O3") + SET(CMAKE_C_OPT_FLAGS "-O3 -fstrict-aliasing") ELSE(ENABLE_OPTIMIZATION MATCHES "ON") - SET(CMAKE_C_OPT_FLAGS "-O0") + SET(CMAKE_C_OPT_FLAGS "-O0 -fstrict-aliasing") ENDIF(ENABLE_OPTIMIZATION MATCHES "ON") ENDIF(NOT CMAKE_C_OPT_FLAGS) |