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()
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)
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})
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
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})
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)
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
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})
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
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}")
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()
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()