summaryrefslogtreecommitdiffstats
path: root/contrib/hiredis/CMakeLists.txt
blob: d83ad3fc3e24b4a6be00334fcf16fc768d660a90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Hiredis compilation target

SET(LIBHIREDISSRC async.c
                  dict.c
                  hiredis.c
                  net.c
                  sds.c)

if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
endif ()
ADD_LIBRARY(hiredis STATIC ${LIBHIREDISSRC})
IF(CMAKE_COMPILER_IS_GNUCC)
SET_TARGET_PROPERTIES(hiredis PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing")
ENDIF(CMAKE_COMPILER_IS_GNUCC)

TARGET_LINK_LIBRARIES(hiredis ${CMAKE_REQUIRED_LIBRARIES})