Skip to content

Commit 3c8a0af

Browse files
authored
Merge pull request #9515 from etcwilde/ewilde/20240723-enable-cmp0156
🍒[CMake] Enable CMP0156 if available
2 parents 1279344 + 437b33e commit 3c8a0af

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cmake/Modules/CMakePolicy.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,11 @@ endif()
2929
if(POLICY CMP0144)
3030
cmake_policy(SET CMP0144 NEW)
3131
endif()
32+
33+
# CMP0156: De-duplicate libraries on link lines based on linker capabilities.
34+
# New in CMake 3.29: https://cmake.org/cmake/help/latest/policy/CMP0156.html
35+
# Avoids the deluge of 'ld: warning: ignoring duplicate libraries' warnings when
36+
# building with the Apple linker.
37+
if(POLICY CMP0156)
38+
cmake_policy(SET CMP0156 NEW)
39+
endif()

0 commit comments

Comments
 (0)