]> source.dussan.org Git - rspamd.git/commitdiff
[Rework] Require proper C++ environment for Rspamd build
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 14 Jan 2021 14:03:19 +0000 (14:03 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 14 Jan 2021 14:03:19 +0000 (14:03 +0000)
CMakeLists.txt
src/CMakeLists.txt

index 908d1bb0ef0b57e2db38e82cfdf5c04c22d13690..698550f0718667b0324539d86f28458586a30764 100644 (file)
@@ -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")
index 9a34d2ac4af62513bcaeb5a94d68962963db3002..7285d8e7bbb9a2b9dcd55bbcf17da3c5595b46b1 100644 (file)
@@ -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 ()