diff options
author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2020-11-12 13:55:25 +0200 |
---|---|---|
committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2020-11-12 23:11:35 +0200 |
commit | 29b17fa335388c9b93f70c29b2398cf2fee65785 (patch) | |
tree | 997c990f067aa2cb52cd11a47a7a7f99d28b98b9 /cmake/QtExecutableHelpers.cmake | |
parent | 1777ddc234bb51dcf9b9c251e3872cc733a06e34 (diff) |
CMake: fix running Android tests
Android *.so files need to CXX visibility to default after
qt_set_common_target_properties() which was setting it to hidden.
Also, pass the correct androidtestrunner arguments for cmake check
target
Fixes: QTBUG-88228
Change-Id: Ia29cdc9e65153c9669f3ec06f74a46f8fcd8c507
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtExecutableHelpers.cmake')
-rw-r--r-- | cmake/QtExecutableHelpers.cmake | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/cmake/QtExecutableHelpers.cmake b/cmake/QtExecutableHelpers.cmake index 42bc05fb49..29793d24fc 100644 --- a/cmake/QtExecutableHelpers.cmake +++ b/cmake/QtExecutableHelpers.cmake @@ -24,12 +24,6 @@ function(qt_internal_add_executable name) qt_android_apply_arch_suffix("${name}") qt_android_generate_deployment_settings("${name}") qt_android_add_apk_target("${name}") - # On our qmake builds we don't compile the executables with - # visibility=hidden. Not having this flag set will cause the - # executable to have main() hidden and can then no longer be loaded - # through dlopen() - set_property(TARGET ${name} PROPERTY C_VISIBILITY_PRESET default) - set_property(TARGET ${name} PROPERTY CXX_VISIBILITY_PRESET default) else() add_executable("${name}" ${arg_EXE_FLAGS}) endif() @@ -77,6 +71,14 @@ function(qt_internal_add_executable name) endif() qt_set_common_target_properties(${name}) + if(ANDROID) + # On our qmake builds we don't compile the executables with + # visibility=hidden. Not having this flag set will cause the + # executable to have main() hidden and can then no longer be loaded + # through dlopen() + set_property(TARGET ${name} PROPERTY C_VISIBILITY_PRESET default) + set_property(TARGET ${name} PROPERTY CXX_VISIBILITY_PRESET default) + endif() qt_autogen_tools_initial_setup(${name}) qt_skip_warnings_are_errors_when_repo_unclean("${name}") |