From 1b070e1cc245132abf577d52d047403644f40b79 Mon Sep 17 00:00:00 2001 From: jcschaff Date: Fri, 26 Jul 2024 13:47:10 -0400 Subject: [PATCH] use libc++ on macOS and libstdc++ on other platforms. --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b1ebe03..1ce89dbe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -127,9 +127,11 @@ if (${OPTION_TARGET_DOCS}) endif() if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") -# if (NOT WINDOWS) -# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") -# endif() + if (APPLE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + elseif (MINGW) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++") + else() set(CMAKE_OSX_DEPLOYMENT_TARGET "10.7" CACHE STRING "Choose minimum deploy target for Macos machines") endif()