From 5e737f42bfca0e0b0aaf338a3128b6bbf2bb7f04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Fri, 19 Feb 2016 00:57:46 +0100 Subject: [PATCH] GH-1410 use libc++ on OSX --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f95c53c4c..4125fa292 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,9 @@ set(CMAKE_C_STANDARD 11) include(Coverage) include(GenerateExportHeader) set(CMAKE_CXX_FLAGS " -Wall -D_GLIBCXX_USE_CXX11_ABI=0 ${CMAKE_CXX_FLAGS}") +if(UNIX AND APPLE) + set(CMAKE_CXX_FLAGS " -stdlib=libc++ ${CMAKE_CXX_FLAGS}") +endif() set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror=return-type") # cmake code needed for the coverity scan upload