]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: remove checking for GCC 5.1 24477/head
authorKefu Chai <kchai@redhat.com>
Mon, 8 Oct 2018 15:32:18 +0000 (23:32 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 8 Oct 2018 15:35:57 +0000 (23:35 +0800)
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 <kchai@redhat.com>
src/CMakeLists.txt

index 874eabfaa13a2fb6e785732b29e27582da87de4a..f12e6db8642cc7134efac6bb76de898f48e9e911 100644 (file)
@@ -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)