]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: require GCC-8.1 and up
authorKefu Chai <kchai@redhat.com>
Mon, 7 Jun 2021 08:17:09 +0000 (16:17 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 9 Jun 2021 15:25:22 +0000 (23:25 +0800)
for better C++17 support, for instance for a better std::filesystem
support.

the reason why 8.1 is required is that ubuntu focal provides GCC-8.1,
and RHEL/CentOS8 provides GCC-8.4.1. so we only test the build on
GCC-8.1 and up so far.

Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake/modules/CephChecks.cmake
src/os/CMakeLists.txt

index baf9d1f87c72a0e2e62527d72b3058b0c07ddd6c..634fa02a8ecfbda1074ae8801244beedb761f01c 100644 (file)
@@ -1,6 +1,6 @@
-if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
-  if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7)
-    message(FATAL_ERROR "GCC 7+ required due to C++17 requirements")
+if(CMAKE_COMPILER_IS_GNUCXX)
+  if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.1)
+    message(FATAL_ERROR "GCC 8.1+ required due to C++17 requirements")
   endif()
 endif()
 
index 522d572967acb70b9e26933f6aec2d70fc203e70..9008f2ed8c04ed56dcb8967d20141c52c4810c9a 100644 (file)
@@ -106,11 +106,6 @@ if(WITH_BLUESTORE)
     bluestore/bluestore_tool.cc)
   target_link_libraries(ceph-bluestore-tool
     os global)
-  # TODO: drop this linkage once we don't need to build on bionic
-  if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
-    target_link_libraries(ceph-bluestore-tool
-      Boost::filesystem)
-  endif()
   install(TARGETS ceph-bluestore-tool
     DESTINATION bin)
 endif()