From: Vsevolod Stakhov Date: Thu, 14 Jan 2021 14:03:19 +0000 (+0000) Subject: [Rework] Require proper C++ environment for Rspamd build X-Git-Tag: 3.0~765 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7de0d515d16928d6dbdaa3965a54626f4b38d815;p=rspamd.git [Rework] Require proper C++ environment for Rspamd build --- 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 ()