summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/testlib/CMakeLists.txt3
-rw-r--r--src/testlib/qtestblacklist.cpp7
2 files changed, 9 insertions, 1 deletions
diff --git a/src/testlib/CMakeLists.txt b/src/testlib/CMakeLists.txt
index 0dc6f29505..22df4c93b4 100644
--- a/src/testlib/CMakeLists.txt
+++ b/src/testlib/CMakeLists.txt
@@ -133,4 +133,7 @@ qt_add_docs(Test
# special case begin
qt_apply_testlib_coverage_options(Test)
+
+# Allow blacklisting tests depending on whether testlib was built as part of a CMake build.
+target_compile_definitions(Test PRIVATE QT_CMAKE_BUILD)
# special case end
diff --git a/src/testlib/qtestblacklist.cpp b/src/testlib/qtestblacklist.cpp
index d4165fb240..6695605f12 100644
--- a/src/testlib/qtestblacklist.cpp
+++ b/src/testlib/qtestblacklist.cpp
@@ -58,7 +58,8 @@ QT_BEGIN_NAMESPACE
referring to this documentation is kind to readers. Comments can also be used
to indicate the reasons for ignoring particular cases.
- The key "ci" applies only when run by COIN. Other keys name platforms,
+ The key "ci" applies only when run by COIN.
+ The key "cmake" applies when Qt is built using CMake. Other keys name platforms,
operating systems, distributions, tool-chains or architectures; a ! prefix
reverses what it checks. A version, joined to a key (at present, only for
distributions and for msvc) with a hyphen, limits the key to the specific
@@ -164,6 +165,10 @@ static QSet<QByteArray> keywords()
#ifdef QT_BUILD_INTERNAL
<< "developer-build"
#endif
+
+#ifdef QT_CMAKE_BUILD
+ << "cmake"
+#endif
;
#if QT_CONFIG(properties)