From 5d6b75a40a2aaec697f433f18d36c42e603663c3 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Mon, 19 Feb 2024 21:19:41 +0000 Subject: [PATCH] src/CMakeLists: require gcc13 for crimson, clarify error messages Signed-off-by: Samuel Just --- src/CMakeLists.txt | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9cbe350b388..cff57c32eaa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -125,14 +125,18 @@ if(COMPILER_SUPPORTS_REDUNDANT_MOVE) endif() if(CMAKE_CXX_COMPILER_ID STREQUAL GNU) if(WIN32) - # require >= gcc-10 for compiling the windows port - set(minimum_gcc_version 10) + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10) + message(FATAL_ERROR "C++20 support for win32 requires a minimum GCC version of 10.") + endif() + elseif(HAVE_SEASTAR) + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) + # see https://tracker.ceph.com/issues/64375 for details + message(FATAL_ERROR "crimson/seastar require minimum GCC version of 13 for C++20 and coroutine support") + endif() else() - # require >= gcc-11 for compiling the whole tree - set(minimum_gcc_version 11) - endif() - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS minimum_gcc_version) - message(FATAL_ERROR "C++20 support requires a minimum GCC version of ${minimum_gcc_version}.") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11) + message(FATAL_ERROR "C++20 support requires a minimum GCC version of 11.") + endif() endif() if(MINGW) # The MINGW headers are missing some "const" qualifiers. -- 2.47.3