From fa9df442c6829b9cf7842646fac58fa324b9ac59 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Sat, 6 Dec 2025 23:04:07 +0000 Subject: [PATCH] cmake: Suppress duplicated libraries warnings Part-of: --- CompilerFlags.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CompilerFlags.cmake b/CompilerFlags.cmake index 1644f69c2..ad3c46b91 100644 --- a/CompilerFlags.cmake +++ b/CompilerFlags.cmake @@ -38,6 +38,13 @@ if(NOT WIN32 AND NOT APPLE) set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined") endif() +if(APPLE) + # Suppress warnings about duplicate libraries in the link line. + # This happens because CMake's transitive dependency handling can + # result in the same static library appearing multiple times. + add_link_options("-Wl,-no_warn_duplicate_libraries") +endif() + # Must call before adding targets that will use xrt-optimized-math macro(xrt_optimized_math_flags) if(MSVC)