From d6072b95711287c1db67804326045835baf88aae Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 8 Oct 2018 23:32:18 +0800 Subject: [PATCH] cmake: remove checking for GCC 5.1 this reverts bcc0511d3b857a8810493ca3d3f17ba053651af2, because * we already check for C++17 support in the same cmake list * it's non trivial to check the O(1) std::list::size(). * we always build using the GCC 7.3 from SCLs on CentOS and RHEL. so the error message is always printed if we could have detected the O(1) std::list::size(). and we cannot fail the build if we are using an standard library with O(1) std::list::size(). so, this check is pointless. Signed-off-by: Kefu Chai --- src/CMakeLists.txt | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 874eabfaa13a..f12e6db8642c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -138,17 +138,6 @@ int main() { } " HAVE_STDLIB_MAP_SPLICING) -if(CMAKE_COMPILER_IS_GNUCXX AND - CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1) - # this is not always correct, as one can use clang with libstdc++ or - # use old gcc with new libstdc++, but it covers the most cases. - # - # libstdc++ 4.9 has O(n) list::size(), and its regex is buggy - message(SEND_ERROR "performance regression is expected due to an O(n) " - "implementation of 'std::list::size()' in libstdc++ older than 5.1.0, " - "Please use GCC 5.1 and up.") -endif() - ## Handle diagnostics color if compiler supports them. CHECK_C_COMPILER_FLAG("-fdiagnostics-color=always" COMPILER_SUPPORTS_DIAGNOSTICS_COLOR) -- 2.47.3