cmake: Add opt-out for adding -no_warn_duplicate_libraries linker flag
The classic linker (triggered via -ld_classic) doesn't support this flag, and we can't construct a genex that takes this into account, so add an opt-out for Qt WebEngine. Pick-to: 6.7 Change-Id: I62418e0ff37fe8f5bdda2fa8d01b36a8fd44542a Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
7689127d83
commit
b74369c033
@ -249,8 +249,9 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
|
||||
# - https://gitlab.kitware.com/cmake/cmake/-/issues/25297 and
|
||||
# - https://indiestack.com/2023/10/xcode-15-duplicate-library-linker-warnings/
|
||||
set(is_xcode15 "$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,15>")
|
||||
set(not_disabled "$<NOT:$<BOOL:$<TARGET_PROPERTY:QT_NO_DISABLE_WARN_DUPLICATE_LIBRARIES>>>")
|
||||
target_link_options(PlatformCommonInternal INTERFACE
|
||||
"$<${is_xcode15}:LINKER:-no_warn_duplicate_libraries>")
|
||||
"$<$<AND:${not_disabled},${is_xcode15}>:LINKER:-no_warn_duplicate_libraries>")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
|
Loading…
x
Reference in New Issue
Block a user