aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-12-19 10:55:28 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-12-19 10:55:28 +0000
commitdd1134f06b174f1829d81b67d7c1a6aeaf8bcc1e (patch)
treee5483eda2482a320ad834bad246fd7e0759c308d
parenta13bc71723ef269d7dcee56416a5f42cd8ee8a72 (diff)
downloadrspamd-dd1134f06b174f1829d81b67d7c1a6aeaf8bcc1e.tar.gz
rspamd-dd1134f06b174f1829d81b67d7c1a6aeaf8bcc1e.zip
Compile external tools with optimizations.
-rw-r--r--contrib/blake2/CMakeLists.txt4
-rw-r--r--contrib/hiredis/CMakeLists.txt3
-rw-r--r--contrib/http-parser/CMakeLists.txt3
-rw-r--r--contrib/libottery/CMakeLists.txt4
m---------contrib/siphash0
-rw-r--r--contrib/xxhash/CMakeLists.txt3
6 files changed, 14 insertions, 3 deletions
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
-Subproject a2008b797d528768f849f7b7ab2ec4cde66cc1c
+Subproject 5c2607c17fdc195d84bb63c0c9c3b6500f51696
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