From 08aab6bcdee8bdc61d44d4c42b97e5e46be81bf4 Mon Sep 17 00:00:00 2001 From: Vladyslav Usenko Date: Sun, 21 Nov 2021 18:51:55 +0100 Subject: [PATCH] Fix for AppleClang 12 --- thirdparty/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index d7b7161..cf944ca 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -69,7 +69,12 @@ endif() # fix pangolin: macOS >= 10.14 Mojave if(APPLE AND CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL 18.0.0) - target_compile_options(pangolin PRIVATE "-Wno-deprecated-declarations" "-Wno-deprecated-copy") + target_compile_options(pangolin PRIVATE "-Wno-deprecated-declarations") + + if(CMAKE_CXX_COMPILER_ID "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 12.0.0) + target_compile_options(pangolin PRIVATE "-Wno-deprecated-copy") + endif() + endif() # fix pangolin: clang