From 8aa4184bcd1db2f51cb2f5fb4e6c81b5ecd86037 Mon Sep 17 00:00:00 2001 From: Owen Green Date: Thu, 28 Jan 2021 09:58:19 +0000 Subject: [PATCH] Fix standard library selection on OS X For test program compile during configure stage when targeting 10.8 from >=10.15 --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8168920..0391687 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,8 @@ if (APPLE) set(CMAKE_XCODE_GENERATE_SCHEME ON) set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "") set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8" CACHE STRING "") + #A consequence of targetting 10.8. Needs to be set globally from 10.15 onwards in order for the test program to compile successfully during configure + string(APPEND CMAKE_CXX_FLAGS " -stdlib=libc++") endif() ################################################################################