aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-01-14 14:03:19 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-01-14 14:03:19 +0000
commit7de0d515d16928d6dbdaa3965a54626f4b38d815 (patch)
tree065a1ae8a2ee98d67e084779286114cfad30bd7c
parent51781c159f926e95364070ba462a6186ac4d2d32 (diff)
downloadrspamd-7de0d515d16928d6dbdaa3965a54626f4b38d815.tar.gz
rspamd-7de0d515d16928d6dbdaa3965a54626f4b38d815.zip
[Rework] Require proper C++ environment for Rspamd build
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/CMakeLists.txt4
2 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 908d1bb0e..698550f07 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,7 +27,9 @@ CMAKE_POLICY(SET CMP0075 NEW)
# This is supported merely with cmake 3.1
SET(CMAKE_C_STANDARD 11)
+SET(CMAKE_CXX_STANDARD 17)
SET(CMAKE_C_STANDARD_REQUIRED ON)
+SET(CMAKE_CXX_STANDARD_REQUIRED ON)
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/")
SET(RSPAMD_MASTER_SITE_URL "https://rspamd.com")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9a34d2ac4..7285d8e7b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -68,12 +68,16 @@ IF (ENABLE_CLANG_PLUGIN MATCHES "ON")
FOREACH(_lib ${CLANG_EXTRA_PLUGINS_LIBS})
SET(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -Xclang -load -Xclang ${_lib}")
+ SET(CMAKE_CXX_FLAGS
+ "${CMAKE_CXX_FLAGS} -Xclang -load -Xclang ${_lib}")
ENDFOREACH()
ENDIF()
IF(CLANG_EXTRA_PLUGINS)
FOREACH(_plug ${CLANG_EXTRA_PLUGINS})
SET(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -Xclang -add-plugin -Xclang ${_plug}")
+ SET(CMAKE_CXX_FLAGS
+ "${CMAKE_C_FLAGS} -Xclang -add-plugin -Xclang ${_plug}")
ENDFOREACH()
ENDIF()
ENDIF ()