Mercurial > trustbridge
comparison ui/tests/CMakeLists.txt @ 298:56507c3d5f1e
Adapt remaining cinstprocesstest to new arg pattern
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 02 Apr 2014 16:13:37 +0000 |
parents | 3ae8b3ab3eab |
children | eecc06f714fd |
comparison
equal
deleted
inserted
replaced
297:f733f4aa2a90 | 298:56507c3d5f1e |
---|---|
13 endif() | 13 endif() |
14 | 14 |
15 macro(add_m13_test _source _additional_sources) | 15 macro(add_m13_test _source _additional_sources) |
16 set(_test ${_source}) | 16 set(_test ${_source}) |
17 get_filename_component(_name ${_source} NAME_WE) | 17 get_filename_component(_name ${_source} NAME_WE) |
18 set(_test_sources_with_resources ${_test} ${_additional_sources}) | 18 set(_test_sources_with_resources ${_test} "${_additional_sources};${CMAKE_CURRENT_SOURCE_DIR}/common.cpp") |
19 qt5_add_resources(_test_sources_with_resources | 19 qt5_add_resources(_test_sources_with_resources |
20 ${CMAKE_CURRENT_SOURCE_DIR}/data/testdata.qrc) | 20 ${CMAKE_CURRENT_SOURCE_DIR}/data/testdata.qrc) |
21 add_executable(${_name} ${_test_sources_with_resources}) | 21 add_executable(${_name} ${_test_sources_with_resources}) |
22 add_test(m13-${_name} ${_name}) | 22 add_test(m13-${_name} ${_name}) |
23 target_link_libraries(${_name} Qt5::Test Qt5::Widgets | 23 target_link_libraries(${_name} Qt5::Test Qt5::Widgets |
27 endmacro() | 27 endmacro() |
28 | 28 |
29 # Add the current source dir to the definition | 29 # Add the current source dir to the definition |
30 # so that it can be used in file names in the tests. | 30 # so that it can be used in file names in the tests. |
31 add_definitions(-DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") | 31 add_definitions(-DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") |
32 add_m13_test(certlistparsertest.cpp "${CERTIFICATELIST_SOURCES};${CMAKE_CURRENT_SOURCE_DIR}/common.cpp") | 32 add_m13_test(certlistparsertest.cpp "${CERTIFICATELIST_SOURCES}") |
33 | 33 |
34 # Downloader | 34 # Downloader |
35 if (HIAWATHA_EXECUTABLE) | 35 if (HIAWATHA_EXECUTABLE) |
36 set(DOWNLOADER_SOURCES_WITH_RESOURCES ${DOWNLOADER_SOURCES}) | 36 set(DOWNLOADER_SOURCES_WITH_RESOURCES ${DOWNLOADER_SOURCES}) |
37 qt5_add_resources(DOWNLOADER_SOURCES_WITH_RESOURCES ${M13UI_RESOURCES}) | 37 qt5_add_resources(DOWNLOADER_SOURCES_WITH_RESOURCES ${M13UI_RESOURCES}) |
38 add_m13_test(downloadertest.cpp "${DOWNLOADER_SOURCES_WITH_RESOURCES};${CMAKE_CURRENT_SOURCE_DIR}/common.cpp") | 38 add_m13_test(downloadertest.cpp "${DOWNLOADER_SOURCES_WITH_RESOURCES}") |
39 endif() | 39 endif() |
40 | 40 |
41 # Cinstprocess | 41 # Cinstprocess |
42 add_m13_test(cinstprocesstest.cpp "${CERTIFICATELIST_SOURCES}") | 42 add_m13_test(cinstprocesstest.cpp "${CERTIFICATELIST_SOURCES}") |
43 add_dependencies(cinstprocesstest cinst) | 43 add_dependencies(cinstprocesstest cinst) |