From: Vsevolod Stakhov Date: Fri, 19 Dec 2014 10:55:28 +0000 (+0000) Subject: Compile external tools with optimizations. X-Git-Tag: 0.8.0~70 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dd1134f06b174f1829d81b67d7c1a6aeaf8bcc1e;p=rspamd.git Compile external tools with optimizations. --- diff --git a/contrib/blake2/CMakeLists.txt b/contrib/blake2/CMakeLists.txt index ce173e708..58c79450b 100644 --- a/contrib/blake2/CMakeLists.txt +++ b/contrib/blake2/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) set(BLAKE_SRC blake2b-ref.c) -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - set(CMAKE_C_FLAGS "-O3") +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(blake2 STATIC "${BLAKE_SRC}") diff --git a/contrib/hiredis/CMakeLists.txt b/contrib/hiredis/CMakeLists.txt index 992fe6c92..d83ad3fc3 100644 --- a/contrib/hiredis/CMakeLists.txt +++ b/contrib/hiredis/CMakeLists.txt @@ -6,6 +6,9 @@ SET(LIBHIREDISSRC async.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") diff --git a/contrib/http-parser/CMakeLists.txt b/contrib/http-parser/CMakeLists.txt index ff4687cb0..40b0d55c9 100644 --- a/contrib/http-parser/CMakeLists.txt +++ b/contrib/http-parser/CMakeLists.txt @@ -1,5 +1,8 @@ SET(HTTPSRC http_parser.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(rspamd-http-parser ${LINK_TYPE} ${HTTPSRC}) SET_TARGET_PROPERTIES(rspamd-http-parser PROPERTIES VERSION ${RSPAMD_VERSION}) SET_TARGET_PROPERTIES(rspamd-http-parser PROPERTIES COMPILE_FLAGS "-DRSPAMD_LIB") diff --git a/contrib/libottery/CMakeLists.txt b/contrib/libottery/CMakeLists.txt index 52667ff84..0483c49f3 100644 --- a/contrib/libottery/CMakeLists.txt +++ b/contrib/libottery/CMakeLists.txt @@ -3,5 +3,7 @@ SET(OTTERYSRC chacha_merged.c ottery_cpuinfo.c ottery_entropy.c ottery_global.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(ottery STATIC ${OTTERYSRC}) \ No newline at end of file diff --git a/contrib/siphash b/contrib/siphash index a2008b797..5c2607c17 160000 --- a/contrib/siphash +++ b/contrib/siphash @@ -1 +1 @@ -Subproject commit a2008b797d528768f849f7b7ab2ec4cde66cc1c2 +Subproject commit 5c2607c17fdc195d84bb63c0c9c3b6500f516960 diff --git a/contrib/xxhash/CMakeLists.txt b/contrib/xxhash/CMakeLists.txt index 2cc0234d8..41c05d4e9 100644 --- a/contrib/xxhash/CMakeLists.txt +++ b/contrib/xxhash/CMakeLists.txt @@ -1,3 +1,6 @@ SET(XXHASHSRC xxhash.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(xxhash STATIC ${XXHASHSRC}) \ No newline at end of file