From: Kefu Chai Date: Sun, 8 Apr 2018 01:57:36 +0000 (+0800) Subject: cmake: define HAVE_STDLIB_MAP_SPLICING for both libstdc++ and libc++ X-Git-Tag: v13.1.0~352^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7d1679f1d3c209233edcff383530d6ee94b89ba0;p=ceph.git cmake: define HAVE_STDLIB_MAP_SPLICING for both libstdc++ and libc++ Signed-off-by: Kefu Chai --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index be1ebaf2d5c1a..2bf655c7d1ef4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 using Map = std::map; 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)