diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-02-09 16:26:54 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-02-09 16:26:54 +0000 |
commit | 8b0c8fd52e5c404a2fef132495d0a6ffd3174323 (patch) | |
tree | f4d132d118e9615d0437645074e0f7f60f63c5ba /cmake | |
parent | 10a141583005c5394e00b267cce7d6b7585d7c8e (diff) | |
download | rspamd-8b0c8fd52e5c404a2fef132495d0a6ffd3174323.tar.gz rspamd-8b0c8fd52e5c404a2fef132495d0a6ffd3174323.zip |
[Minor] Toolset: Use libc++ as libstdc++ is broken on old compilers
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Toolset.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/Toolset.cmake b/cmake/Toolset.cmake index d54abb795..5a4faebf2 100644 --- a/cmake/Toolset.cmake +++ b/cmake/Toolset.cmake @@ -27,17 +27,19 @@ endif () if (COMPILER_GCC) # Require minimum version of gcc - set (GCC_MINIMUM_VERSION 4) + set (GCC_MINIMUM_VERSION 8) if (CMAKE_C_COMPILER_VERSION VERSION_LESS ${GCC_MINIMUM_VERSION} AND NOT CMAKE_VERSION VERSION_LESS 2.8.9) message (FATAL_ERROR "GCC version must be at least ${GCC_MINIMUM_VERSION}.") endif () elseif (COMPILER_CLANG) # Require minimum version of clang - set (CLANG_MINIMUM_VERSION 4) + set (CLANG_MINIMUM_VERSION 7) if (CMAKE_C_COMPILER_VERSION VERSION_LESS ${CLANG_MINIMUM_VERSION}) message (FATAL_ERROR "Clang version must be at least ${CLANG_MINIMUM_VERSION}.") endif () ADD_COMPILE_OPTIONS(-Wno-unused-command-line-argument) + # Use libc++ as libstdc++ is buggy in many cases + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") else () message (WARNING "You are using an unsupported compiler ${CMAKE_C_COMPILER_ID}. Compilation has only been tested with Clang 4+ and GCC 4+.") endif () |