diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-16 18:40:24 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-16 18:40:24 +0400 |
commit | acc1e657ead019fd3e0835cadddf4d39a7b9f181 (patch) | |
tree | d4a5e9a765795233213d6d4ac703bcd8f0b6d5bf /CMakeLists.txt | |
parent | d19de7c6034b03309d84073c4e482f9fbcd3c349 (diff) | |
download | rspamd-acc1e657ead019fd3e0835cadddf4d39a7b9f181.tar.gz rspamd-acc1e657ead019fd3e0835cadddf4d39a7b9f181.zip |
* Fix indexes in fuzzy hashes calculations
* Add optimization flags support
* Enable -O by default
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c2d2cbc1..4c4dcbb72 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -265,8 +265,14 @@ ELSE (MD5_INCLUDE) MESSAGE(STATUS "WARNING: Using internal MD5 support") ENDIF (MD5_INCLUDE) +IF(ENABLE_OPTIMIZATION MATCHES "ON") + SET(CMAKE_C_OPT_FLAGS "-O3") +ELSE(ENABLE_OPTIMIZATION MATCHES "ON") + SET(CMAKE_C_OPT_FLAGS "-O") +ENDIF(ENABLE_OPTIMIZATION MATCHES "ON") + SET(CMAKE_C_WARN_FLAGS "-Wall -W -Wpointer-arith -Wno-unused-parameter -Wno-unused-function -Wunused-variable -Wno-sign-compare -Wunused-value -Wno-declaration-after-statement -Wno-pointer-sign") -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_WARN_FLAGS} -std=c99") +SET(CMAKE_C_FLAGS "${CMAKE_C_OPT_FLAGS} ${CMAKE_C_FLAGS} ${CMAKE_C_WARN_FLAGS} -std=c99") # Platform specific routines IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") |