aboutsummaryrefslogtreecommitdiff
path: root/autotests/kconfig_compiler/CMakeLists.txt
blob: 4caa17af0fa12bb02ed3285d024036da202a7e0f (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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313

# On Windows we have to generate the .h and .cpp inside ${CMAKE_BINARY_DIR}/bin because
# otherwise QFINDTESTDATA will not be able to locate them.
if(WIN32)
    set(KCFG_OUTPUT_DIR "${CMAKE_BINARY_DIR}/bin")
else()
    set(KCFG_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}")
endif()

# make sure the generated headers can be found
include_directories(${KCFG_OUTPUT_DIR})

include(${CMAKE_SOURCE_DIR}/KF5ConfigMacros.cmake)
macro(GEN_KCFG_TEST_SOURCE _testName _srcs)
   KCONFIG_ADD_KCFG_FILES(${_srcs} ${_testName}.kcfgc ${ARGN})
endmacro()

include(ECMMarkAsTest)

########### next target ###############

set(test1_SRCS test1main.cpp )


gen_kcfg_test_source(test1 test1_SRCS)

ecm_add_test(TEST_NAME test1 ${test1_SRCS})
target_link_libraries(test1 KF5::ConfigGui)


########### next target ###############

set(test2_SRCS test2main.cpp )


gen_kcfg_test_source(test2 test2_SRCS)

ecm_add_test(TEST_NAME test2 ${test2_SRCS})
target_link_libraries(test2 KF5::ConfigGui)


########### next target ###############

set(test3_SRCS test3main.cpp )


gen_kcfg_test_source(test3 test3_SRCS)

ecm_add_test(TEST_NAME test3 ${test3_SRCS})
target_link_libraries(test3 KF5::ConfigGui)


########### next target ###############

set(test3a_SRCS test3amain.cpp )


gen_kcfg_test_source(test3a test3a_SRCS)

ecm_add_test(TEST_NAME test3a ${test3a_SRCS})
target_link_libraries(test3a KF5::ConfigGui)


########### next target ###############

set(test4_SRCS test4main.cpp )


gen_kcfg_test_source(test4 test4_SRCS)

ecm_add_test(TEST_NAME test4 ${test4_SRCS})
target_link_libraries(test4 KF5::ConfigGui)


########### next target ###############

set(test5_SRCS test5main.cpp )


gen_kcfg_test_source(test5 test5_SRCS)

ecm_add_test(TEST_NAME test5 ${test5_SRCS})
target_link_libraries(test5 KF5::ConfigGui)


########### next target ###############

set(test6_SRCS test6main.cpp )


gen_kcfg_test_source(test6 test6_SRCS)

ecm_add_test(TEST_NAME test6 ${test6_SRCS})
target_link_libraries(test6 KF5::ConfigGui)


########### next target ###############

set(test7_SRCS test7main.cpp )


gen_kcfg_test_source(test7 test7_SRCS)

ecm_add_test(TEST_NAME test7 ${test7_SRCS})
target_link_libraries(test7 KF5::ConfigGui)


########### next target ###############

set(test8_SRCS test8main.cpp )


gen_kcfg_test_source(test8a test8_SRCS)
gen_kcfg_test_source(test8b test8_SRCS)
gen_kcfg_test_source(test8c test8_SRCS)

ecm_add_test(TEST_NAME test8 ${test8_SRCS})
target_link_libraries(test8 KF5::ConfigGui)


########### next target ###############

set(test9_SRCS test9main.cpp )


gen_kcfg_test_source(test9 test9_SRCS)

ecm_add_test(TEST_NAME test9 ${test9_SRCS})
target_link_libraries(test9 KF5::ConfigGui)


########### next target ###############

set(test10_SRCS test10main.cpp )


gen_kcfg_test_source(test10 test10_SRCS)

ecm_add_test(TEST_NAME test10 ${test10_SRCS})
target_link_libraries(test10 KF5::ConfigGui)


########### next target ###############

set(test11_SRCS test11main.cpp )


gen_kcfg_test_source(test11 test11_SRCS)
gen_kcfg_test_source(test11a test11_SRCS)

ecm_add_test(TEST_NAME test11 ${test11_SRCS})
target_link_libraries(test11 KF5::ConfigGui)


########### next target ###############

set(test12_SRCS test12main.cpp )

gen_kcfg_test_source(test12 test12_SRCS)

ecm_add_test(TEST_NAME test12 ${test12_SRCS})
target_link_libraries(test12 KF5::ConfigGui)

########### next target ###############

set(test13_SRCS test13main.cpp )

gen_kcfg_test_source(test13 test13_SRCS GENERATE_MOC)

ecm_add_test(TEST_NAME test13 ${test13_SRCS})
target_link_libraries(test13 KF5::ConfigGui)

########### next target ###############

set(test_state_config_SRCS test_state_config_main.cpp)

gen_kcfg_test_source(test_state_config test_state_config_SRCS GENERATE_MOC)

ecm_add_test(TEST_NAME test_state_config ${test_state_config_SRCS})
target_link_libraries(test_state_config KF5::ConfigGui Qt5::Test)

########### next target ###############

set(test_emptyentries_SRCS test_emptyentries_main.cpp )

gen_kcfg_test_source(test_emptyentries test_emptyentries_SRCS GENERATE_MOC)

ecm_add_test(TEST_NAME test_emptyentries ${test_emptyentries_SRCS})
target_link_libraries(test_emptyentries KF5::ConfigGui)

########### next target ###############

set(test_subgroups_SRCS test_subgroups_main.cpp )

gen_kcfg_test_source(test_subgroups test_subgroups_SRCS GENERATE_MOC)

ecm_add_test(TEST_NAME test_subgroups ${test_subgroups_SRCS})
target_link_libraries(test_subgroups KF5::ConfigGui)


########### next target ###############

set(test_dpointer_SRCS test_dpointer_main.cpp )

gen_kcfg_test_source(test_dpointer test_dpointer_SRCS)

ecm_add_test(TEST_NAME test_dpointer ${test_dpointer_SRCS})
target_link_libraries(test_dpointer KF5::ConfigGui)


########### next target ###############

set(test_signal_SRCS test_signal_main.cpp )
gen_kcfg_test_source(test_signal test_signal_SRCS GENERATE_MOC)
ecm_add_test(TEST_NAME test_signal ${test_signal_SRCS})
target_link_libraries(test_signal KF5::ConfigGui)


########### next target ###############

set(test_notifiers_SRCS test_notifiers_main.cpp )
gen_kcfg_test_source(test_notifiers test_notifiers_SRCS)
ecm_add_test(TEST_NAME test_notifiers ${test_notifiers_SRCS})
target_link_libraries(test_notifiers KF5::ConfigGui)


########### next target ###############

set(kconfigcompiler_test_signals_SRCS kconfigcompiler_test_signals.cpp)
gen_kcfg_test_source(signals_test_singleton kconfigcompiler_test_signals_SRCS GENERATE_MOC)
gen_kcfg_test_source(signals_test_no_singleton kconfigcompiler_test_signals_SRCS GENERATE_MOC)
gen_kcfg_test_source(signals_test_singleton_dpointer kconfigcompiler_test_signals_SRCS GENERATE_MOC)
gen_kcfg_test_source(signals_test_no_singleton_dpointer kconfigcompiler_test_signals_SRCS GENERATE_MOC)

ecm_add_test(${kconfigcompiler_test_signals_SRCS}
    TEST_NAME kconfigcompiler-signals-test
    LINK_LIBRARIES Qt5::Test KF5::ConfigGui
)

########### next target ###############

set(test_properties_minmax_SRCS test_properties_minmax_main.cpp)
gen_kcfg_test_source(test_properties_minmax test_properties_minmax_SRCS GENERATE_MOC)

ecm_add_test(${test_properties_minmax_SRCS}
    TEST_NAME test_properties_minmax
    LINK_LIBRARIES KF5::ConfigGui
)

########### next target ###############

set(test_param_minmax_SRCS test_param_minmax_main.cpp)
gen_kcfg_test_source(test_param_minmax test_param_minmax_SRCS)

ecm_add_test(${test_param_minmax_SRCS}
    TEST_NAME test_param_minmax
    LINK_LIBRARIES KF5::ConfigGui
)

########### next target ###############

ecm_add_test(kconfigcompiler_test.cpp
    TEST_NAME kconfigcompiler-basic-test
    LINK_LIBRARIES Qt5::Test
)


########### next target ###############

set(test_qcategory_SRCS test_qdebugcategorymain.cpp test_qdebugcategory_debug.cpp)
gen_kcfg_test_source(test_qdebugcategory test_qcategory_SRCS)
ecm_add_test(TEST_NAME test_qdebugcategory ${test_qcategory_SRCS})
target_link_libraries(test_qdebugcategory KF5::ConfigGui)

########### next target ###############

set(test_translation_qt_SRCS test_translation_qt_main.cpp)
gen_kcfg_test_source(test_translation_qt test_translation_qt_SRCS)

ecm_add_test(TEST_NAME test_translation_qt ${test_translation_qt_SRCS})
target_link_libraries(test_translation_qt KF5::ConfigGui)

########### next target ###############

set(test_translation_kde_SRCS test_translation_kde_main.cpp)
gen_kcfg_test_source(test_translation_kde test_translation_kde_SRCS)

ecm_add_test(TEST_NAME test_translation_kde ${test_translation_kde_SRCS})
target_link_libraries(test_translation_kde KF5::ConfigGui)

########### next target ###############

set(test_translation_kde_domain_SRCS test_translation_kde_domain_main.cpp)
gen_kcfg_test_source(test_translation_kde_domain test_translation_kde_domain_SRCS)

ecm_add_test(TEST_NAME test_translation_kde_domain ${test_translation_kde_domain_SRCS})
target_link_libraries(test_translation_kde_domain KF5::ConfigGui)

########### next target ###############

set(test_fileextensions_SRCS test_fileextensions_main.cxx)
gen_kcfg_test_source(test_fileextensions test_fileextensions_SRCS)

ecm_add_test(TEST_NAME test_fileextensions ${test_fileextensions_SRCS})
target_link_libraries(test_fileextensions KF5::ConfigGui)


####### next target ##########
## If this to compiles, we are sure that the generation is correct.
set(test_enums_and_properties_SRCS enum_group_main.cpp)
gen_kcfg_test_source(test_enums_and_properties test_enums_and_properties_SRCS GENERATE_MOC)
ecm_add_test(TEST_NAME test_enums_and_properties ${test_enums_and_properties_SRCS})
target_link_libraries(test_enums_and_properties KF5::ConfigGui)