From 2368718ec16e46e681ce5d564c0ca9a6b2705319 Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Thu, 15 May 2025 16:52:09 +0300 Subject: [PATCH] Clang 17+ is more restrictive on rebind on MacOS/Boost, remove warning --- cmake/cflags-generic.cmake | 5 +++++ cmake/osdetection.cmake | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/cmake/cflags-generic.cmake b/cmake/cflags-generic.cmake index 6bc60502..4eb532fa 100644 --- a/cmake/cflags-generic.cmake +++ b/cmake/cflags-generic.cmake @@ -36,6 +36,11 @@ if(NETBSD) set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -DHAVE_BUILTIN_POPCOUNT") endif() +if(MACOSX) + set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wno-deprecated-declarations") + set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Wno-deprecated-declarations") +endif() + # these end up in the config file CHECK_C_COMPILER_FLAG(-fvisibility=hidden HAS_C_HIDDEN) CHECK_CXX_COMPILER_FLAG(-fvisibility=hidden HAS_CXX_HIDDEN) diff --git a/cmake/osdetection.cmake b/cmake/osdetection.cmake index 2cef0b94..96083baf 100644 --- a/cmake/osdetection.cmake +++ b/cmake/osdetection.cmake @@ -17,6 +17,10 @@ if(CMAKE_SYSTEM_NAME MATCHES "NetBSD") set(NETBSD true) endif(CMAKE_SYSTEM_NAME MATCHES "NetBSD") +if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(MACOSX TRUE) +endif() + if (ARCH_IA32 OR ARCH_X86_64) option(FAT_RUNTIME "Build a library that supports multiple microarchitectures" ON) else()