diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 00c340553..06cc9fd30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,11 +21,9 @@ ENDIF() SET(RSPAMD_VERSION "${RSPAMD_VERSION_MAJOR}.${RSPAMD_VERSION_MINOR}") -PROJECT(rspamd VERSION "${RSPAMD_VERSION}" LANGUAGES C CXX ASM) +PROJECT(rspamd VERSION "${RSPAMD_VERSION}" LANGUAGES C ASM) # This is supported merely with cmake 3.1 -SET(USE_CXX_LINKER 1) - SET(CMAKE_C_STANDARD 11) SET(CMAKE_C_STANDARD_REQUIRED ON) @@ -652,6 +650,14 @@ IF(ENABLE_HYPERSCAN MATCHES "ON") hs include/hs ROOT ${HYPERSCAN_ROOT_DIR} MODULES libhs) SET(WITH_HYPERSCAN 1) + + # For static linking with Hyperscan we need to link using CXX + IF (ENABLE_HYPERSCAN MATCHES "ON") + IF(${HYPERSCAN_LIBRARY} MATCHES ".*[.]a$" OR STATIC_HYPERSCAN) + ENABLE_LANGUAGE(CXX) + SET(USE_CXX_LINKER 1) + ENDIF() + ENDIF() ENDIF() #Check for openssl (required for dkim) |