aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-20 21:23:16 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-20 21:23:24 +0000
commitbef452ccbc501e756e4cb00db887454038781bbb (patch)
tree074ab79e47388060ba633f83ec5705294fbfef9b
parentc0a9a49c3216e94adcf19564e22ef020c53e95fe (diff)
downloadrspamd-bef452ccbc501e756e4cb00db887454038781bbb.tar.gz
rspamd-bef452ccbc501e756e4cb00db887454038781bbb.zip
Hyperscan is available for x86_64 only so far
-rw-r--r--CMakeLists.txt12
-rw-r--r--FindArch.cmake (renamed from src/libcryptobox/FindArch.cmake)0
-rw-r--r--src/libcryptobox/CMakeLists.txt5
3 files changed, 12 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 263249f38..ae77b8330 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,8 +55,16 @@ OPTION(ENABLE_CLANG_PLUGIN "Enable clang static analysing plugin [default: OFF]"
OPTION(ENABLE_HYPERSCAN "Enable hyperscan for fast regexp processing [default: OFF]" OFF)
-IF (ENABLE_HYPERSCAN MATCHES "ON")
- ENABLE_LANGUAGE(CXX)
+INCLUDE(FindArch.cmake)
+TARGET_ARCHITECTURE(ARCH)
+
+IF ("${ARCH}" STREQUAL "x86_64")
+ IF (ENABLE_HYPERSCAN MATCHES "ON")
+ ENABLE_LANGUAGE(CXX)
+ ENDIF()
+ELSE()
+ MESSAGE(STATUS "Hyperscan support is possible only for x86_64 architecture")
+ SET(ENABLE_HYPERSCAN "OFF")
ENDIF()
# Build optimized code for following CPU (default i386)
#SET(CPU_TUNE "i686")
diff --git a/src/libcryptobox/FindArch.cmake b/FindArch.cmake
index 277289248..277289248 100644
--- a/src/libcryptobox/FindArch.cmake
+++ b/FindArch.cmake
diff --git a/src/libcryptobox/CMakeLists.txt b/src/libcryptobox/CMakeLists.txt
index a5c883ec5..18736dc06 100644
--- a/src/libcryptobox/CMakeLists.txt
+++ b/src/libcryptobox/CMakeLists.txt
@@ -1,9 +1,8 @@
-INCLUDE(FindArch.cmake)
INCLUDE(AsmOp.cmake)
TARGET_ARCHITECTURE(ARCH)
-SET(CHACHASRC ${CMAKE_CURRENT_SOURCE_DIR}/chacha20/chacha.c
+SET(CHACHASRC ${CMAKE_CURRENT_SOURCE_DIR}/chacha20/chacha.c
${CMAKE_CURRENT_SOURCE_DIR}/chacha20/ref.c)
SET(POLYSRC ${CMAKE_CURRENT_SOURCE_DIR}/poly1305/poly1305.c)
SET(SIPHASHSRC ${CMAKE_CURRENT_SOURCE_DIR}/siphash/siphash.c
@@ -86,4 +85,4 @@ INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
SET(LIBCRYPTOBOXSRC ${CMAKE_CURRENT_SOURCE_DIR}/cryptobox.c)
SET(RSPAMD_CRYPTOBOX ${LIBCRYPTOBOXSRC} ${CHACHASRC} ${POLYSRC} ${SIPHASHSRC}
- ${CURVESRC} ${BLAKE2SRC} PARENT_SCOPE) \ No newline at end of file
+ ${CURVESRC} ${BLAKE2SRC} PARENT_SCOPE)