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>
-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()
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()