]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
Clang 17+ is more restrictive on rebind<T> on MacOS/Boost, remove warning (#332)
authorKonstantinos Margaritis <markos@users.noreply.github.com>
Fri, 16 May 2025 10:44:20 +0000 (13:44 +0300)
committerGitHub <noreply@github.com>
Fri, 16 May 2025 10:44:20 +0000 (13:44 +0300)
* Clang 17+ is more restrictive on rebind<T> on MacOS/Boost, remove warning

* More clang/boost warnings on MacOS, disable for now

cmake/cflags-generic.cmake
cmake/osdetection.cmake

index 6bc605024a256162cc14942ec1f46741c439574f..28a05493fd0ed04f44e9aae0dea93a9ff5e3c8d2 100644 (file)
@@ -36,6 +36,12 @@ if(NETBSD)
     set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -DHAVE_BUILTIN_POPCOUNT")
 endif()
 
+if(MACOSX)
+    # Boost headers cause such complains on MacOS
+    set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wno-deprecated-declarations -Wno-unused-parameter")
+    set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Wno-deprecated-declarations -Wno-unused-parameter")
+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)
index 2cef0b94f14e59e2a98c84d048176f4702bbbb18..96083baf42b50cd2a91cec8b9f8ff25f1e62dff3 100644 (file)
@@ -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()