summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/plugin')
-rw-r--r--tests/auto/corelib/plugin/qplugin/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp6
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/corelib/plugin/qplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qplugin/CMakeLists.txt
index efc810075a..b2829099aa 100644
--- a/tests/auto/corelib/plugin/qplugin/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qplugin/CMakeLists.txt
@@ -21,5 +21,7 @@ add_qt_test(tst_qplugin
TESTDATA ${test_data}
)
+target_compile_definitions(tst_qplugin PRIVATE CMAKE_BUILD=1)
+
add_dependencies(tst_qplugin invalidplugin debugplugin releaseplugin)
# special case end
diff --git a/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp b/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
index aa85a7c35b..644b8b700d 100644
--- a/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
+++ b/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
@@ -81,6 +81,9 @@ void tst_QPlugin::loadDebugPlugin()
QObject *object = loader.instance();
QVERIFY(object != 0);
#else
+# if defined(CMAKE_BUILD) && defined(QT_NO_DEBUG)
+ QSKIP("Skipping test as it is not possible to disable build targets based on configuration with CMake");
+# endif
// loading a plugin is dependent on which lib we are running against
# if defined(QT_NO_DEBUG)
// release build, we cannot load debug plugins
@@ -111,6 +114,9 @@ void tst_QPlugin::loadReleasePlugin()
QObject *object = loader.instance();
QVERIFY(object != 0);
#else
+# if defined(CMAKE_BUILD) && !defined(QT_NO_DEBUG)
+ QSKIP("Skipping test as it is not possible to disable build targets based on configuration with CMake");
+# endif
// loading a plugin is dependent on which lib we are running against
# if defined(QT_NO_DEBUG)
// release build, we can load debug plugins