aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-27 14:16:12 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-27 14:16:12 +0100
commitb066f62bfafd0e3dc0ebb181e0990fede4f32d47 (patch)
tree115de8240cc99016d4ba3f7dfdd410a1566e54db /CMakeLists.txt
parenta086a4b6e93a7ef2e41b41dbbd9220ae3210eee7 (diff)
downloadrspamd-b066f62bfafd0e3dc0ebb181e0990fede4f32d47.tar.gz
rspamd-b066f62bfafd0e3dc0ebb181e0990fede4f32d47.zip
[Minor] Always enable sse2 on x86_64
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b3fd7cae1..80e00e67e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,6 +74,17 @@ IF (NOT "${ARCH}" STREQUAL "x86_64")
SET(ENABLE_HYPERSCAN "OFF")
ENDIF()
+IF ("${ARCH}" STREQUAL "x86_64")
+ MESSAGE(STATUS "Enable sse2 on x86_64 architecture")
+ IF((CMAKE_C_COMPILER_ID MATCHES "GNU") OR (CMAKE_C_COMPILER_ID MATCHES "Clang"))
+ ADD_COMPILE_OPTIONS(-msse2)
+ ELSEIF(CMAKE_C_COMPILER_ID MATCHES "Intel")
+ ADD_COMPILE_OPTIONS(/QxSSE2)
+ ELSEIF((CMAKE_C_COMPILER_ID MATCHES "MSVC"))
+ ADD_COMPILE_OPTIONS(/arch:SSE2)
+ ENDIF()
+ENDIF()
+
IF(ENABLE_PCRE2 MATCHES "ON")
SET(WITH_PCRE2 1)
# For utf8 API