]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
src/CMakeLists: require gcc13 for crimson, clarify error messages 61376/head
authorSamuel Just <sjust@redhat.com>
Mon, 19 Feb 2024 21:19:41 +0000 (21:19 +0000)
committerSamuel Just <sjust@redhat.com>
Wed, 15 Jan 2025 20:41:21 +0000 (12:41 -0800)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/CMakeLists.txt

index 9cbe350b388a30cef718a1cc8aea2c2855ef35f1..cff57c32eaa36dc44a9333d4b39ff22a140f94cc 100644 (file)
@@ -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.