]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Remove enforced "-O3" from contrib libraries
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 25 Dec 2019 13:05:01 +0000 (13:05 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 25 Dec 2019 13:05:01 +0000 (13:05 +0000)
12 files changed:
cmake/Toolset.cmake
contrib/aho-corasick/CMakeLists.txt
contrib/fpconv/CMakeLists.txt
contrib/hiredis/CMakeLists.txt
contrib/http-parser/CMakeLists.txt
contrib/kann/CMakeLists.txt
contrib/lc-btrie/CMakeLists.txt
contrib/libev/CMakeLists.txt
contrib/libottery/CMakeLists.txt
contrib/lua-lpeg/CMakeLists.txt
contrib/t1ha/CMakeLists.txt
contrib/zstd/CMakeLists.txt

index 8e7c1bb29a053fc7e6fccdc2336b727996fe3da5..2d4460097e2bb5a05d0e7f94b332a14bb275bca0 100644 (file)
@@ -161,8 +161,8 @@ else ()
     set (CMAKE_C_FLAGS_RELWITHDEBINFO      "${CMAKE_C_FLAGS_RELEASE} -O2 ${COMPILER_FAST_MATH} ${COMPILER_DEBUG_FLAGS}")
     set (CMAKE_CXX_FLAGS_RELWITHDEBINFO    "${CMAKE_CXX_FLAGS_RELEASE} -O2 ${COMPILER_FAST_MATH} ${COMPILER_DEBUG_FLAGS}")
 
-    set (CMAKE_C_FLAGS_DEBUG           "${CMAKE_C_FLAGS_DEBUG} -O1 ${COMPILER_FAST_MATH} ${COMPILER_DEBUG_FLAGS}")
-    set (CMAKE_CXX_FLAGS_DEBUG         "${CMAKE_CXX_FLAGS_DEBUG} -O1 ${COMPILER_FAST_MATH} ${COMPILER_DEBUG_FLAGS}")
+    set (CMAKE_C_FLAGS_DEBUG           "${CMAKE_C_FLAGS_DEBUG} -O0 ${COMPILER_FAST_MATH} ${COMPILER_DEBUG_FLAGS}")
+    set (CMAKE_CXX_FLAGS_DEBUG         "${CMAKE_CXX_FLAGS_DEBUG} -O0 ${COMPILER_FAST_MATH} ${COMPILER_DEBUG_FLAGS}")
 endif()
 
 
index 93c51a14615731449375c0c6eb7d250983b7780e..2c431b5b8774601dac21852991430db7963a064a 100644 (file)
@@ -1,12 +1,6 @@
 SET(AHOCORASICSRC      acism_create.c
                                        acism.c)
 
-IF(ENABLE_FULL_DEBUG MATCHES "OFF")
-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
-endif ()
-ENDIF()
-
 IF(NOT GPL_RSPAMD_BINARY)
        ADD_LIBRARY(rspamd-actrie SHARED ${AHOCORASICSRC})
        target_link_libraries(rspamd-actrie glib-2.0)
index 0d27dbb7f6c540b7869892f134167afacb5bbbd9..b3305250bb75b1d530911a5a15300950fb9192b5 100644 (file)
@@ -1,11 +1,6 @@
 SET(FPCONVSRC            fpconv.c)
 
 SET(FTPCONV_COMPILE_FLAGS "-DRSPAMD_LIB")
-IF(ENABLE_FULL_DEBUG MATCHES "OFF")
-    if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-        set(FTPCONV_COMPILE_FLAGS "${FTPCONV_COMPILE_FLAGS} -O3")
-    endif ()
-ENDIF()
 
 ADD_LIBRARY(rspamd-fpconv STATIC ${FPCONVSRC})
 SET_TARGET_PROPERTIES(rspamd-fpconv PROPERTIES VERSION ${RSPAMD_VERSION})
index f8b233996eb220dcc501010f5f79253e8ae716f6..1e056319f488f8d2b7b6fc5633a78d46b79819a5 100644 (file)
@@ -6,13 +6,6 @@ SET(HIREDISSRC async.c
                                sds.c)
 
 SET(HIREDIS_CFLAGS "")
-
-IF(ENABLE_FULL_DEBUG MATCHES "OFF")
-IF("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-       SET(HIREDIS_CFLAGS "${HIREDIS_CFLAGS} -O3")
-ENDIF()
-ENDIF()
-
 ADD_LIBRARY(rspamd-hiredis STATIC ${HIREDISSRC})
 
 SET_TARGET_PROPERTIES(rspamd-hiredis PROPERTIES COMPILE_FLAGS "${HIREDIS_CFLAGS}")
\ No newline at end of file
index 499c85e932175600368c89e4c48f2be393b731a4..a5da7010c78d86fa70f6c8de5f5bdae1b1538243 100644 (file)
@@ -2,11 +2,6 @@ SET(HTTPSRC            http_parser.c)
 
 
 SET(HTTP_COMPILE_FLAGS "-DRSPAMD_LIB")
-IF(ENABLE_FULL_DEBUG MATCHES "OFF")
-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-       set(HTTP_COMPILE_FLAGS "${HTTP_COMPILE_FLAGS} -O3")
-endif ()
-ENDIF()
 
 ADD_LIBRARY(rspamd-http-parser STATIC ${HTTPSRC})
 SET_TARGET_PROPERTIES(rspamd-http-parser PROPERTIES VERSION ${RSPAMD_VERSION})
index 2bf32c92eccbd29f93b202039adc136ecf2ef0d9..b3a1d547ccc790ced0668fedd653f13838945245 100644 (file)
@@ -1,11 +1,5 @@
 SET(LIBKANNSRC kautodiff.c kann.c)
 
-IF(ENABLE_FULL_DEBUG MATCHES "OFF")
-    if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
-    endif ()
-ENDIF()
-
 ADD_LIBRARY(rspamd-kann SHARED ${LIBKANNSRC})
 
 IF(WITH_BLAS)
index b520bda862540edc7028e6806e1fb5cf80c1b1e9..a5fe9e53d872ea27406e64312f636cb32d84b897 100644 (file)
@@ -2,10 +2,5 @@ SET(LCTRIESRC            btrie.c)
 ADD_LIBRARY(lcbtrie STATIC ${LCTRIESRC})
 
 SET(LCTRIE_CFLAGS "-DBUILD_RSPAMD")
-IF(ENABLE_FULL_DEBUG MATCHES "OFF")
-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-    SET(LCTRIE_CFLAGS "${LCTRIE_CFLAGS} -O3")
-endif ()
-ENDIF()
 
 set_target_properties(lcbtrie PROPERTIES COMPILE_FLAGS "${LCTRIE_CFLAGS}")
\ No newline at end of file
index e98ff126e8dc7abf2a89277f7c94731c1161173b..db380db95b2a3509dbd8c4475e7622013e4cfb5c 100644 (file)
@@ -47,12 +47,6 @@ CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_LIBRT)
 CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_CLOCK_GETTIME)
 CHECK_LIBRARY_EXISTS(m ceil "" HAVE_LIBM)
 
-IF(ENABLE_FULL_DEBUG MATCHES "OFF")
-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
-endif ()
-ENDIF()
-
 CONFIGURE_FILE(config.h.in libev-config.h)
 
 ADD_LIBRARY(rspamd-ev SHARED ${LIBEVSRC})
index 84da8136a7fbff48ce24efc6e432a5e9b20d184a..b8536f2f17854c8eaa16995067b702b41ad6af45 100644 (file)
@@ -8,9 +8,4 @@ SET(OTTERYSRC            chacha_merged.c
 ADD_LIBRARY(ottery STATIC ${OTTERYSRC})
 
 SET(OTTERY_CFLAGS "-DBUILD_RSPAMD -DOTTERY_NO_PID_CHECK -DOTTERY_NO_INIT_CHECK -DOTTERY_NO_WIPE_STACK")
-IF(ENABLE_FULL_DEBUG MATCHES "OFF")
-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-    SET(OTTERY_CFLAGS "${OTTERY_CFLAGS} -O3")
-endif ()
-ENDIF()
 set_target_properties(ottery PROPERTIES COMPILE_FLAGS "${OTTERY_CFLAGS}")
\ No newline at end of file
index 2362aac9cd5e69ccb6e71d5f3a099ee584c2a21d..92dd0182dbbca7558d2f82f1dff91fe06ec90a15 100644 (file)
@@ -4,12 +4,6 @@ SET(LPEGSRC lpcap.c
         lptree.c
         lpvm.c)
 
-IF(ENABLE_FULL_DEBUG MATCHES "OFF")
-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-    SET(LPEG_CFLAGS "${LPEG_CFLAGS} -O3")
-endif ()
-ENDIF()
-
 SET(LIB_TYPE STATIC)
 ADD_LIBRARY(rspamd-lpeg ${LIB_TYPE} ${LPEGSRC})
 set_target_properties(rspamd-lpeg PROPERTIES COMPILE_FLAGS "${LPEG_CFLAGS}")
index 491010ff959b0697aee65c5069da7005c69ec817..c8de483f419a28d741af3e65b48dcdc948e994c0 100644 (file)
@@ -4,9 +4,3 @@ SET(T1HASRC     t1ha1.c
 ADD_LIBRARY(rspamd-t1ha STATIC ${T1HASRC})
 SET_TARGET_PROPERTIES(rspamd-t1ha PROPERTIES VERSION ${RSPAMD_VERSION})
 ADD_DEFINITIONS("-DT1HA_USE_FAST_ONESHOT_READ=0")
-
-IF(ENABLE_FULL_DEBUG MATCHES "OFF")
-    if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-        SET_TARGET_PROPERTIES(rspamd-t1ha PROPERTIES COMPILE_FLAGS "-O3")
-    endif ()
-ENDIF()
index 2cccee0c170b0cb31fc67a1196c9448967e057d0..120e179ba357c9f445f9d08f9ffdf2493945cc5d 100644 (file)
@@ -22,9 +22,3 @@ SET(ZSTDSRC
 
 ADD_LIBRARY(rspamd-zstd STATIC ${ZSTDSRC})
 ADD_DEFINITIONS(-DZSTD_STATIC_LINKING_ONLY)
-
-IF(ENABLE_FULL_DEBUG MATCHES "OFF")
-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-       SET_TARGET_PROPERTIES(rspamd-zstd PROPERTIES COMPILE_FLAGS "-O3")
-endif ()
-ENDIF()