diff --git a/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt index 30931b4b28e..50bfc314ce3 100644 --- a/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt +++ b/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt @@ -16,6 +16,7 @@ qt_internal_add_test(tst_qpluginloader ../theplugin/plugininterface.h ../tst_qpluginloader.cpp LIBRARIES + Qt::CorePrivate staticplugin TESTDATA ${test_data} ) @@ -46,26 +47,3 @@ if(ANDROID) QT_ANDROID_EXTRA_LIBS "${extra_libs}" ) endif() - -## Scopes: -##################################################################### - -qt_internal_extend_target(tst_qpluginloader - LIBRARIES - Qt::CorePrivate -) - -qt_internal_extend_target(tst_qpluginloader CONDITION CMAKE_BUILD_TYPE STREQUAL Debug AND WIN32 AND debug_and_release - LIBRARIES - # Remove: L../staticplugin/debug -) - -qt_internal_extend_target(tst_qpluginloader CONDITION WIN32 AND debug_and_release AND NOT CMAKE_BUILD_TYPE STREQUAL Debug - LIBRARIES - # Remove: L../staticplugin/release -) - -qt_internal_extend_target(tst_qpluginloader CONDITION UNIX OR NOT debug_and_release - LIBRARIES - # Remove: L../staticplugin -) diff --git a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp index 46ec5f693d9..54da124f87b 100644 --- a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp +++ b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp @@ -12,7 +12,7 @@ #include #include "theplugin/plugininterface.h" -#include +#include #if defined(QT_BUILD_INTERNAL) && defined(Q_OF_MACH_O) # include @@ -861,7 +861,9 @@ void tst_QPluginLoader::archSpecificVersion() QString expectedArch; #if defined(Q_PROCESSOR_X86_64) && defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) - if (__builtin_cpu_supports("avx2") && __builtin_cpu_supports("fma")) + // On Unix systems (other than Darwin, which has fat binaries), + // QPluginLoader will load a separate file for x86-64-v3 systems. + if (qCpuHasFeature(ArchHaswell)) expectedArch = "x86-64-v3"; #endif