From 06493ee1c31523b905d757e574447d26bf7ca3cb Mon Sep 17 00:00:00 2001 From: Owen Green Date: Thu, 19 Dec 2019 12:58:02 +0000 Subject: [PATCH] Ensure 10.7 target on Mac --- CMakeLists.txt | 1 + scripts/target_post.cmake | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 677406a..9965cff 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,7 @@ set(FLUID_PATH "" CACHE PATH "Optional path to the Fluid Decomposition repo") if (APPLE) set(CMAKE_OSX_ARCHITECTURES x86_64) set(CMAKE_XCODE_GENERATE_SCHEME ON) + set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7) endif() ################################################################################ diff --git a/scripts/target_post.cmake b/scripts/target_post.cmake index 1cf8e50..3534b03 100644 --- a/scripts/target_post.cmake +++ b/scripts/target_post.cmake @@ -5,7 +5,7 @@ if(MSVC) target_compile_options(${PLUGIN} PRIVATE /W3) else() target_compile_options(${PLUGIN} PRIVATE - -Wall -Wextra -Wpedantic -Wreturn-type -Wconversion -Wno-conversion -Wno-c++11-narrowing -Wno-sign-compare + -Wall -Wextra -Wpedantic -Wreturn-type -Wconversion -Wno-c++11-narrowing ) endif() @@ -15,6 +15,14 @@ set_target_properties(${PLUGIN} PROPERTIES CXX_EXTENSIONS NO ) +if(APPLE) + set_target_properties(${PLUGIN} PROPERTIES + XCODE_GENERATE_SCHEME ON + ) + #If we target 10.7 (actually < 10.9), we have to manually include this: + target_compile_options(${PLUGIN} PRIVATE -stdlib=libc++) +endif() + target_link_libraries( ${PLUGIN} PRIVATE