diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2021-06-03 13:51:48 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-06-10 15:30:09 +0000 |
commit | 9278be7f3922a1919af11659f3adf793b342c742 (patch) | |
tree | cd2a9c9904532ad6555bc5790982490c8faffc1c /tests/auto | |
parent | a3065c1f4d5c384378d7e0cb43086b4ae6da67b1 (diff) |
Add the check for linker capabilities to resolve circular dependencies
'ld' only capable to resolve circular dependencies by wrapping the
suspected static libraries and objects using --start/end-group
arguments. We want to detect if linker is 'ld' at configure time to
decide how to link the resource objects if finalizers are not enabled.
The qt_config_compile_test function is extended with an extra argument
since it's required to pass custom cmake flags to the ld-related test.
Change-Id: I484fcc99e2886952d8b0232f37e4e6a35d072931
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 4e901a2f99cbfda3b479253ea54b16f02e1c3aa5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/cmake/test_static_resources/test_static_resources_propagation/CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/cmake/test_static_resources/test_static_resources_propagation/CMakeLists.txt b/tests/auto/cmake/test_static_resources/test_static_resources_propagation/CMakeLists.txt index 40c922fd8b..f8f46e14f4 100644 --- a/tests/auto/cmake/test_static_resources/test_static_resources_propagation/CMakeLists.txt +++ b/tests/auto/cmake/test_static_resources/test_static_resources_propagation/CMakeLists.txt @@ -58,8 +58,8 @@ add_test(NAME test_static_resources_propagation_non_qt COMMAND test_static_resources_propagation_non_qt ) - -if(NOT GCC AND NOT MINGW AND NOT CLANG) +get_property(link_order_matters GLOBAL PROPERTY QT_LINK_ORDER_MATTERS) +if(NOT link_order_matters) ## Add the executable using add_executable, expecting resources to be linked regardless of order. add_executable(test_static_resources_propagation_non_ld main.cpp) set_target_properties(test_static_resources_propagation_non_ld PROPERTIES |