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. Change-Id: I62418e0ff37fe8f5bdda2fa8d01b36a8fd44542a Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit b74369c03325e49132dc77f2a83af8fd25c81a8a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
e81212e01a
commit
edc004ae7f
@ -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