From 242620ff0f111898e61f84b1dc758cc0be67c28d Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 20 Mar 2018 02:10:48 -0400 Subject: [PATCH] Fixing deployment target issues on OS X broke cpp-multithread due to deployment target libc++ issues. Fixed. Fixes #302. --- examples/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 75b7f9d1..61ed7b82 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -30,6 +30,12 @@ _add_example(cpp-multithread if(NOT WIN32) target_link_libraries(cpp-multithread pthread) endif() +if(APPLE) + # since we use a deployment target of 10.8, the non-C++11-compliant libstdc++ is chosen by default; we need C++11 + # see issue #302 for more details + target_compile_options(cpp-multithread PRIVATE --stdlib=libc++) + target_link_libraries(cpp-multithread --stdlib=libc++) +endif() _add_example(drawtext drawtext/main.c