commit 7de0d51: [Rework] Require proper C++ environment for Rspamd build

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Jan 14 14:07:08 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-01-14 14:03:19 +0000
URL: https://github.com/rspamd/rspamd/commit/7de0d515d16928d6dbdaa3965a54626f4b38d815 (HEAD -> master)

[Rework] Require proper C++ environment for Rspamd build

---
 CMakeLists.txt     | 2 ++
 src/CMakeLists.txt | 4 ++++
 2 files changed, 6 insertions(+)

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 ()


More information about the Commits mailing list