Update list of wide characters
[centerim5.git] / tests / CMakeLists.txt
blobb4e6326c8f72c06d3be658b04fee0eb936f60be5
1 add_compile_options(${SIGC_CFLAGS})
2 link_libraries(${SIGC_LDFLAGS} cppconsui)
4 add_executable(button button.cpp main.cpp)
5 add_executable(colorpicker colorpicker.cpp main.cpp)
6 add_executable(label label.cpp main.cpp)
7 add_executable(submenu submenu.cpp main.cpp)
8 add_executable(textentry textentry.cpp main.cpp)
9 add_executable(textview textview.cpp main.cpp)
10 add_executable(treeview treeview.cpp main.cpp)
11 add_executable(window window.cpp main.cpp)
13 if(TERMEX_TESTS)
14   add_custom_command(OUTPUT terminfo VERBATIM
15     COMMAND "${TIC_EXECUTABLE}" -o terminfo
16       "${CMAKE_CURRENT_SOURCE_DIR}/termex.src"
17     COMMAND "${CMAKE_COMMAND}" -E touch terminfo
18     DEPENDS termex.src)
20   add_custom_target(check VERBATIM COMMAND "${CMAKE_CTEST_COMMAND}"
21     DEPENDS terminfo)
23 else()
24   add_custom_target(check)
26   add_custom_command(TARGET check POST_BUILD VERBATIM
27     COMMAND "${CMAKE_COMMAND}" -E echo "Tests cannot be run because required \
28 dependencies are missing, reconfigure the build and install the tools that are \
29 reported as needed for the testing"
30     COMMAND false)
31 endif()
33 add_dependencies(check
34   button
35   colorpicker
36   label
37   submenu
38   textentry
39   textview
40   treeview
41   window)
43 # List of test playbooks.
44 set(TESTS
45   treeview)
47 foreach(testname ${TESTS})
48   add_test(NAME "${testname}"
49     COMMAND "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/termex.py"
50       -t "${CMAKE_CURRENT_BINARY_DIR}/terminfo" test
51       "${CMAKE_CURRENT_SOURCE_DIR}/${testname}.test")
52 endforeach()