comparison ui/tests/CMakeLists.txt @ 43:5910bf9016cd

Add Downloadertest
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 14 Mar 2014 15:25:47 +0000
parents 00aa5fa3c2fb
children c6125d73faf4
comparison
equal deleted inserted replaced
42:6e7ef7e95031 43:5910bf9016cd
1 set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) 1 set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
2 2
3 include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/..) 3 include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/..)
4 4
5 find_package(Qt5Test) 5 find_package(Qt5Test)
6 find_program(HIAWATHA_EXECUTABLE hiawatha)
7
8 if (NOT HIAWATHA_EXECUTABLE)
9 message (STATUS "WARNING: hiawatha webserver not found. Downloader tests will fail.")
10 else()
11 add_definitions(-DHIAWATHA_EXECUTABLE="${HIAWATHA_EXECUTABLE}")
12 endif()
6 13
7 macro(add_m13_test _source _additional_sources) 14 macro(add_m13_test _source _additional_sources)
8 set(_test ${_source}) 15 set(_test ${_source})
9 get_filename_component(_name ${_source} NAME_WE) 16 get_filename_component(_name ${_source} NAME_WE)
10 add_executable(${_name} ${_test} ${_additional_sources}) 17 add_executable(${_name} ${_test} ${_additional_sources})
16 23
17 # Add the current source dir to the definition 24 # Add the current source dir to the definition
18 # so that it can be used in file names in the tests. 25 # so that it can be used in file names in the tests.
19 add_definitions(-DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") 26 add_definitions(-DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
20 add_m13_test(certlistparsertest.cpp "${CERTIFICATELIST_SOURCES}") 27 add_m13_test(certlistparsertest.cpp "${CERTIFICATELIST_SOURCES}")
28 add_m13_test(downloadertest.cpp "${CMAKE_SOURCE_DIR}/ui/downloader.cpp")
21 #add_m13_test(${CMAKE_SOURCE_DIR}/ui/main.cpp "${M13UI_SOURCES}") 29 #add_m13_test(${CMAKE_SOURCE_DIR}/ui/main.cpp "${M13UI_SOURCES}")
22 30

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