Changeset View
Changeset View
Standalone View
Standalone View
kcms/keyboard/tests/CMakeLists.txt
Show All 10 Lines | 6 | target_link_libraries(${_testname}_test | |||
---|---|---|---|---|---|
11 | Qt5::Test | 11 | Qt5::Test | ||
12 | KF5::I18n | 12 | KF5::I18n | ||
13 | KF5::WindowSystem | 13 | KF5::WindowSystem | ||
14 | ${X11_Xkbfile_LIB} | 14 | ${X11_Xkbfile_LIB} | ||
15 | ${X11_LIBRARIES} | 15 | ${X11_LIBRARIES} | ||
16 | ) | 16 | ) | ||
17 | endmacro(KEYBOARD_DAEMON_UNIT_TESTS) | 17 | endmacro(KEYBOARD_DAEMON_UNIT_TESTS) | ||
18 | 18 | | |||
19 | macro(KEYBOARD_PREVIEW_UNIT_TESTS _testname) | | |||
20 | include_directories("..") | | |||
21 | set(test_SRCS ../preview/${_testname}.cpp ../preview/geometry_components.cpp ../xkb_rules.cpp ../debug.cpp) | | |||
22 | add_executable(${_testname}_test ${_testname}_test.cpp ${test_SRCS}) | | |||
23 | ecm_mark_nongui_executable(${_testname}_test) | | |||
24 | ecm_mark_as_test(${_testname}_test) | | |||
25 | add_test(NAME kcm-keyboard-${_testname} COMMAND ${_testname}_test) | | |||
26 | target_link_libraries(${_testname}_test | | |||
27 | Qt5::Concurrent | | |||
28 | Qt5::Widgets | | |||
29 | Qt5::X11Extras | | |||
30 | Qt5::Xml | | |||
31 | Qt5::Test | | |||
32 | KF5::I18n | | |||
33 | KF5::WindowSystem | | |||
34 | ${X11_Xkbfile_LIB} | | |||
35 | ${X11_LIBRARIES} | | |||
36 | ) | | |||
37 | set_source_files_properties(${test_SRCS} PROPERTIES COMPILE_FLAGS "-fexceptions") | | |||
38 | endmacro(KEYBOARD_PREVIEW_UNIT_TESTS) | | |||
39 | | ||||
40 | | ||||
41 | keyboard_daemon_unit_tests(xkb_rules) | 19 | keyboard_daemon_unit_tests(xkb_rules) | ||
42 | keyboard_daemon_unit_tests(iso_codes) | 20 | keyboard_daemon_unit_tests(iso_codes) | ||
43 | 21 | | |||
44 | find_package(Boost) | | |||
45 | | ||||
46 | if(Boost_FOUND) | | |||
47 | keyboard_preview_unit_tests(geometry_parser) | | |||
48 | if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") | | |||
49 | # the default maximum template expansion depth (256) is not enough | | |||
50 | set_property(SOURCE ../preview/geometry_parser.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -ftemplate-depth=512") | | |||
51 | endif() | | |||
52 | # set_source_files_properties(${preview_SRCS} PROPERTIES COMPILE_FLAGS "-fexceptions") | | |||
53 | endif(Boost_FOUND) | | |||
54 | | ||||
55 | add_executable(flags_test flags_test.cpp ../flags.cpp ../x11_helper.cpp ../keyboard_config.cpp ../xkb_rules.cpp ../debug.cpp) | 22 | add_executable(flags_test flags_test.cpp ../flags.cpp ../x11_helper.cpp ../keyboard_config.cpp ../xkb_rules.cpp ../debug.cpp) | ||
56 | ecm_mark_nongui_executable(flags_test) | 23 | ecm_mark_nongui_executable(flags_test) | ||
57 | ecm_mark_as_test(flags_test) | 24 | ecm_mark_as_test(flags_test) | ||
58 | add_test(NAME kcm-keyboard-flags_test COMMAND flags_test) | 25 | add_test(NAME kcm-keyboard-flags_test COMMAND flags_test) | ||
59 | target_link_libraries(flags_test | 26 | target_link_libraries(flags_test | ||
60 | Qt5::Concurrent | 27 | Qt5::Concurrent | ||
61 | Qt5::X11Extras | 28 | Qt5::X11Extras | ||
62 | Qt5::Xml | 29 | Qt5::Xml | ||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |