MESSAGE(FATAL_ERROR "Ragel is required to build rspamd")
ENDIF()
-IF ("${ARCH}" STREQUAL "x86_64")
- IF (ENABLE_HYPERSCAN MATCHES "ON" OR ENABLE_STATIC MATCHES "ON")
- ENABLE_LANGUAGE(CXX)
- SET(USE_CXX_LINKER 1)
- ENDIF()
-ELSE()
+IF (NOT "${ARCH}" STREQUAL "x86_64")
MESSAGE(STATUS "Hyperscan support is possible only for x86_64 architecture")
SET(ENABLE_HYPERSCAN "OFF")
ENDIF()
SET(WITH_GPERF_TOOLS 1)
ENDIF(ENABLE_GPERF_TOOLS MATCHES "ON")
+IF (ENABLE_HYPERSCAN MATCHES "ON")
+ IF(${HYPERSCAN_LIBRARY} MATCHES ".*[.]a$")
+ ENABLE_LANGUAGE(CXX)
+ SET(USE_CXX_LINKER 1)
+ ENDIF()
+ENDIF()
+
# Process with warn flags
SET(CMAKE_C_WARN_FLAGS "")
CHECK_C_COMPILER_FLAG(-Wall SUPPORT_WALL)