CMake: require no undefined symbols

The ELF default is historical legacy. We should always require all
libraries and all plugins to link to their dependencies and not
accidentally forget something (like implementing a virtual function).

Change-Id: I5e00996d7f4b4a10bc98fffd1629f8bfcf0d1c8f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Thiago Macieira
2020-08-10 10:36:34 -07:00
parent 36c49cd2ea
commit 46f6c5d005
2 changed files with 15 additions and 0 deletions
+1
View File
@@ -244,6 +244,7 @@ function(add_qtc_library name)
unset(NAMELINK_OPTION)
if (library_type STREQUAL "SHARED")
set(NAMELINK_OPTION NAMELINK_SKIP)
qtc_add_link_flags_no_undefined(${name})
endif()
unset(COMPONENT_OPTION)