]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: define HAVE_STDLIB_MAP_SPLICING for both libstdc++ and libc++ 21284/head
authorKefu Chai <kchai@redhat.com>
Sun, 8 Apr 2018 01:57:36 +0000 (09:57 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 8 Apr 2018 01:57:36 +0000 (09:57 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/CMakeLists.txt

index be1ebaf2d5c1a315c2f6eefbf1deb7c010752a74..2bf655c7d1ef43176930157400c9a63096888025 100644 (file)
@@ -167,9 +167,8 @@ else()
   set(C_STANDARD_REQUIRED ON)
 endif()
 
-if(CXX_STDLIB STREQUAL "libc++")
-  include(CheckCXXSourceCompiles)
-  CHECK_CXX_SOURCE_COMPILES("
+include(CheckCXXSourceCompiles)
+CHECK_CXX_SOURCE_COMPILES("
 #include <map>
 using Map = std::map<int, int>;
 int main() {
@@ -177,7 +176,6 @@ int main() {
   m.merge(Map{});
 }
 " HAVE_STDLIB_MAP_SPLICING)
-endif()
 
 if(CMAKE_COMPILER_IS_GNUCXX AND
     CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)