comparison ui/tests/CMakeLists.txt @ 560:3af16cbc961d

Move UI code into librarys to speed up build of unit tests
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 22 May 2014 10:57:05 +0000
parents dd8a295d5b4d
children aee3eb10bbba
comparison
equal deleted inserted replaced
559:dd8a295d5b4d 560:3af16cbc961d
30 qt5_add_resources(_test_sources_with_resources 30 qt5_add_resources(_test_sources_with_resources
31 ${CMAKE_CURRENT_SOURCE_DIR}/data/testdata.qrc) 31 ${CMAKE_CURRENT_SOURCE_DIR}/data/testdata.qrc)
32 add_executable(${_name} ${_test_sources_with_resources}) 32 add_executable(${_name} ${_test_sources_with_resources})
33 add_test(tb-${_name} ${_name}) 33 add_test(tb-${_name} ${_name})
34 target_link_libraries(${_name} 34 target_link_libraries(${_name}
35 tbadminlib
36 tblib
35 ui_common 37 ui_common
36 Qt5::Test Qt5::Widgets 38 Qt5::Test Qt5::Widgets
37 trustbridge_common 39 trustbridge_common
38 ${POLARSSL_LIBRARIES} 40 ${POLARSSL_LIBRARIES}
39 ${EXTRA_STATIC_LIBS}) 41 ${EXTRA_STATIC_LIBS})
40 endmacro() 42 endmacro()
41 43
42 # Add the current source dir to the definition 44 # Add the current source dir to the definition
43 # so that it can be used in file names in the tests. 45 # so that it can be used in file names in the tests.
44 add_definitions(-DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") 46 add_definitions(-DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
45 add_custom_test(certlistparsertest.cpp "${CERTIFICATELIST_SOURCES}") 47 add_custom_test(certlistparsertest.cpp "")
46 48
47 # Downloader 49 # Downloader
48 if (HIAWATHA_EXECUTABLE) 50 if (HIAWATHA_EXECUTABLE)
49 qt5_add_resources(DOWNLOADER_SOURCES_WITH_RESOURCES ${TRUSTBRIDGE_RESOURCES}) 51 qt5_add_resources(DOWNLOADER_SOURCES_WITH_RESOURCES ${TRUSTBRIDGE_RESOURCES})
50 add_custom_test(downloadertest.cpp "${DOWNLOADER_SOURCES_WITH_RESOURCES}") 52 add_custom_test(downloadertest.cpp "${DOWNLOADER_SOURCES_WITH_RESOURCES}")
53 # Cinstprocess 55 # Cinstprocess
54 add_custom_test(cinstprocesstest.cpp "") 56 add_custom_test(cinstprocesstest.cpp "")
55 add_dependencies(cinstprocesstest cinst) 57 add_dependencies(cinstprocesstest cinst)
56 add_custom_test(commontest.cpp "") 58 add_custom_test(commontest.cpp "")
57 59
58 add_custom_test(createcertlisttest.cpp "${CMAKE_SOURCE_DIR}/ui/createcertlistdialog.cpp") 60 add_custom_test(createcertlisttest.cpp "")
59 add_custom_test(mainwindowtest.cpp "${TRUSTBRIDGE_SOURCES}") 61 add_custom_test(mainwindowtest.cpp "")
60 62
61 if (WIN32) 63 if (WIN32)
62 add_custom_test(windowsstoretest.cpp "${CMAKE_SOURCE_DIR}/cinst/windowsstore.c") 64 add_custom_test(windowsstoretest.cpp "${CMAKE_SOURCE_DIR}/cinst/windowsstore.c")
63 endif (WIN32) 65 endif (WIN32)
64 66

http://wald.intevation.org/projects/trustbridge/