diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-09 12:05:33 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-09 12:05:33 +0100 |
commit | 694af5cd68843c8f9bf86e2e404c60d7048a91b6 (patch) | |
tree | c70687d8a12f7f78bf13fb98b678c353e25c0048 | |
parent | a5f9ee7e491e41187658ebf9efb0126837f6d6f5 (diff) | |
download | rspamd-694af5cd68843c8f9bf86e2e404c60d7048a91b6.tar.gz rspamd-694af5cd68843c8f9bf86e2e404c60d7048a91b6.zip |
[Minor] Remove CXX linker requirement unless static Hyperscan is linked
-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) |