summaryrefslogtreecommitdiff
path: root/src/testlib/CMakeLists.txt
blob: 53005d6402dc46a2b5c95376de3dfb1acbab4f56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Generated from testlib.pro.

# special case begin
include(selfcover.cmake)
# special case end

#####################################################################
## Test Module:
#####################################################################

qt_internal_add_module(Test
    CONFIG_MODULE_NAME testlib # special case
    EXCEPTIONS
    SOURCES
        qabstracttestlogger.cpp qabstracttestlogger_p.h
        qasciikey.cpp
        qbenchmark.cpp qbenchmark.h qbenchmark_p.h
        qbenchmarkevent.cpp qbenchmarkevent_p.h
        qbenchmarkmeasurement.cpp qbenchmarkmeasurement_p.h
        qbenchmarkmetric.cpp qbenchmarkmetric.h qbenchmarkmetric_p.h
        qbenchmarkperfevents.cpp qbenchmarkperfevents_p.h
        qbenchmarktimemeasurers_p.h
        qcsvbenchmarklogger.cpp qcsvbenchmarklogger_p.h
        qjunittestlogger.cpp qjunittestlogger_p.h
        qplaintestlogger.cpp qplaintestlogger_p.h
        qsignaldumper.cpp qsignaldumper_p.h
        qsignalspy.h
        qtaptestlogger.cpp qtaptestlogger_p.h
        qteamcitylogger.cpp qteamcitylogger_p.h
        qtest.h
        qtest_gui.h
        qtest_network.h
        qtest_widgets.h
        qtestaccessible.h
        qtestassert.h
        qtestblacklist.cpp qtestblacklist_p.h
        qtestcase.cpp qtestcase.h
        qtestcoreelement_p.h
        qtestcorelist_p.h
        qtestdata.cpp qtestdata.h
        qtestelement.cpp qtestelement_p.h
        qtestelementattribute.cpp qtestelementattribute_p.h
        qtestevent.h
        qtesteventloop.h
        qtesthelpers_p.h
        qtestjunitstreamer.cpp qtestjunitstreamer_p.h
        qtestkeyboard.h
        qtestlog.cpp qtestlog_p.h
        qtestmouse.cpp qtestmouse.h
        qtestresult.cpp qtestresult_p.h
        qtestspontaneevent.h
        qtestsystem.h
        qtesttable.cpp qtesttable_p.h
        qtesttouch.h
        qttestglobal.h
        qxmltestlogger.cpp qxmltestlogger_p.h
    DEFINES
        QT_NO_CAST_FROM_ASCII
        QT_NO_CAST_TO_ASCII
        QT_NO_DATASTREAM
        QT_NO_FOREACH
        QT_BUILD_TESTLIB_LIB # special case
    LIBRARIES
        Qt::CorePrivate
    PUBLIC_LIBRARIES
        Qt::Core
    PRIVATE_MODULE_INTERFACE
        Qt::CorePrivate
)

#### Keys ignored in scope 1:.:.:testlib.pro:<TRUE>:
# MODULE_CONFIG = "console" "testlib_defines"

## Scopes:
#####################################################################

#### Keys ignored in scope 2:.:.:testlib.pro:UNIX AND NOT embedded:
# QMAKE_PKGCONFIG_DESCRIPTION = "Qt" "Unit" "Testing" "Library"

qt_internal_extend_target(Test CONDITION QT_FEATURE_itemmodeltester
    SOURCES
        qabstractitemmodeltester.cpp qabstractitemmodeltester.h
)

qt_internal_extend_target(Test CONDITION QT_FEATURE_valgrind
    SOURCES
        qbenchmarkvalgrind.cpp qbenchmarkvalgrind_p.h
)

qt_internal_extend_target(Test CONDITION embedded
    COMPILE_OPTIONS
        -fno-rtti
)

qt_internal_extend_target(Test CONDITION APPLE
    SOURCES
        qappletestlogger.cpp qappletestlogger_p.h
    PUBLIC_LIBRARIES
        ${FWSecurity}
)

qt_internal_extend_target(Test CONDITION MACOS
    SOURCES
        qtestutil_macos.mm qtestutil_macos_p.h
    PUBLIC_LIBRARIES
        ${FWAppKit}
        ${FWApplicationServices}
        ${FWFoundation}
        ${FWIOKit}
)

# special case begin
# Do not bother with disabled stuff:
# qt_internal_extend_target(Test CONDITION (MACOS) AND (OFF AND NOT lessThan(QMAKE_XCODE_VERSION, "6.0")) ...
# qt_internal_extend_target(Test CONDITION ((MACOS) AND (OFF AND NOT lessThan(QMAKE_XCODE_VERSION, "6.0"))) AND (NOT QMAKE_MAC_SDK_PLATFORM_PATH_ISEMPTY) ...
# special case end

#### Keys ignored in scope 9:.:.:testlib.pro:NOT QMAKE_MAC_SDK_PLATFORM_PATH_ISEMPTY:
# MODULE_CONFIG = "xctest"

#### Keys ignored in scope 10:.:.:testlib.pro:NOT TARGET Qt::Gui:
# HEADERSCLEAN_EXCLUDE = "qtest_gui.h" "qtestaccessible.h" "qtestkeyboard.h" "qtestmouse.h" "qtesttouch.h"

#### Keys ignored in scope 11:.:.:testlib.pro:NOT TARGET Qt::Widgets:
# HEADERSCLEAN_EXCLUDE = "qtest_widgets.h"

#### Keys ignored in scope 12:.:.:testlib.pro:NOT TARGET Qt::Network:
# HEADERSCLEAN_EXCLUDE = "qtest_network.h"
qt_internal_add_docs(Test
    doc/qttestlib.qdocconf
)

# special case begin
qt_internal_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