aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/xxhash/CMakeLists.txt
blob: 5091d261d7a5e20caa59427ac9bef5ff6471ac3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
SET(XXHASHSRC xxhash.c)

ADD_LIBRARY(rspamd-xxhash STATIC ${XXHASHSRC})

IF (ENABLE_FULL_DEBUG MATCHES "OFF")
    if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
        SET_TARGET_PROPERTIES(rspamd-xxhash PROPERTIES COMPILE_FLAGS "-O3")
    endif ()
else ()
    ADD_DEFINITIONS(-DXXH_NO_INLINE_HINTS=1)
ENDIF ()

set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DXXH_NO_INLINE_HINTS=1" PARENT_SCOPE)