Skip to content

Commit

Permalink
Merge pull request #21284 from tchaikov/wip-cmake-libstdcxx
Browse files Browse the repository at this point in the history
cmake: define HAVE_STDLIB_MAP_SPLICING for both libstdc++ and libc++

Reviewed-by: Zheng Yan <zyan@redhat.com>
  • Loading branch information
tchaikov committed Apr 10, 2018
2 parents 7fdfa3c + 7d1679f commit 3abe420
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/CMakeLists.txt
Expand Up @@ -167,17 +167,15 @@ 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() {
Map m;
m.merge(Map{});
}
" HAVE_STDLIB_MAP_SPLICING)
endif()

if(CMAKE_COMPILER_IS_GNUCXX AND
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
Expand Down

0 comments on commit 3abe420

Please sign in to comment.