cmake: Also use -Wl,--no-undefined for Clang

Change-Id: Ida6bf41e496a0e800f1146d15edf192d0635a3c9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Kevin Funk 2019-02-12 19:45:07 +01:00
parent 35a17f1941
commit f0d6fd6b95

View File

@ -588,7 +588,7 @@ function(add_qt_module target)
### fixme: cmake is missing a built-in variable for this. We want to apply it only to modules and plugins
# that belong to Qt.
if (GCC)
if (GCC OR CLANG)
qt_internal_add_link_flags("${target}" "-Wl,--no-undefined")
endif()
@ -674,7 +674,7 @@ function(add_qt_plugin target)
### fixme: cmake is missing a built-in variable for this. We want to apply it only to modules and plugins
# that belong to Qt.
if (GCC)
if (GCC OR CLANG)
qt_internal_add_link_flags("${target}" "-Wl,--no-undefined")
endif()