From b6e6d15a2892027525e0a385279492b8aeec6c52 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 7 Jun 2021 16:17:09 +0800 Subject: [PATCH] cmake: require GCC-8.1 and up 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 --- cmake/modules/CephChecks.cmake | 6 +++--- src/os/CMakeLists.txt | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/cmake/modules/CephChecks.cmake b/cmake/modules/CephChecks.cmake index baf9d1f87c7..634fa02a8ec 100644 --- a/cmake/modules/CephChecks.cmake +++ b/cmake/modules/CephChecks.cmake @@ -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() diff --git a/src/os/CMakeLists.txt b/src/os/CMakeLists.txt index 522d572967a..9008f2ed8c0 100644 --- a/src/os/CMakeLists.txt +++ b/src/os/CMakeLists.txt @@ -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() -- 2.39.5