]> source.dussan.org Git - rspamd.git/commitdiff
Compile external tools with optimizations.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 19 Dec 2014 10:55:28 +0000 (10:55 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 19 Dec 2014 10:55:28 +0000 (10:55 +0000)
contrib/blake2/CMakeLists.txt
contrib/hiredis/CMakeLists.txt
contrib/http-parser/CMakeLists.txt
contrib/libottery/CMakeLists.txt
contrib/siphash
contrib/xxhash/CMakeLists.txt

index ce173e708f14e03a366bf34ac577463908421d83..58c79450b6665ecc3f59dadc97e41d47302cd005 100644 (file)
@@ -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}")
index 992fe6c92a13b6b6c1ad679e3a74c85156b68bf7..d83ad3fc3e24b4a6be00334fcf16fc768d660a90 100644 (file)
@@ -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")
index ff4687cb0d26b9ef0cbbd0ea24f48da6de13d90c..40b0d55c9dbe174f23adba853a9ed9889fb15253 100644 (file)
@@ -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")
index 52667ff840874acc91b778e6ae6d4c6ec089c9c9..0483c49f3a543a2dd38ded4dad8deacca08d582b 100644 (file)
@@ -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
index a2008b797d528768f849f7b7ab2ec4cde66cc1c2..5c2607c17fdc195d84bb63c0c9c3b6500f516960 160000 (submodule)
@@ -1 +1 @@
-Subproject commit a2008b797d528768f849f7b7ab2ec4cde66cc1c2
+Subproject commit 5c2607c17fdc195d84bb63c0c9c3b6500f516960
index 2cc0234d86fda1d76ad5baa02c1bc55105cad029..41c05d4e9fb3fc7a744be4813a66e9b7bcbb00f5 100644 (file)
@@ -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