Commit 4bc37d5a authored by Andreas Pakulat's avatar Andreas Pakulat
Browse files

Port to new kde4_add_*test* macros

svn path=/trunk/KDE/kdemultimedia/libkcddb/; revision=676867
parent 19ea05e4
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/.. )
# Tests don't need to go into toplevel/bin, they are fine in the current dir.
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
MACRO(KCDDB_BUILD_TESTS)
MACRO(KCDDB_EXECUTABLE_TESTS)
FOREACH(_testname ${ARGN})
kde4_automoc(${_testname}.cpp)
kde4_add_test(${_testname} ${_testname}.cpp)
kde4_add_test_executable(${_testname} ${_testname}.cpp)
target_link_libraries(${_testname} ${KDE4_KDEUI_LIBS}
${QT_QTTEST_LIBRARY} kcddb)
ENDFOREACH(_testname)
ENDMACRO(KCDDB_BUILD_TESTS)
MACRO(KCDDB_EXECUTE_TESTS)
ENDMACRO(KCDDB_EXECUTABLE_TESTS)
MACRO(KCDDB_UNIT_TESTS)
FOREACH(_testname ${ARGN})
add_test(kcddb-${_testname} ${EXECUTABLE_OUTPUT_PATH}/${_testname})
kde4_automoc(${_testname}.cpp)
kde4_add_unit_test(${_testname} TESTNAME kcddb-${_testname} ${_testname}.cpp)
target_link_libraries(${_testname} ${KDE4_KDEUI_LIBS}
${QT_QTTEST_LIBRARY} kcddb)
ENDFOREACH(_testname)
ENDMACRO(KCDDB_EXECUTE_TESTS)
ENDMACRO(KCDDB_UNIT_TESTS)
set(kcddb_unittests
KCDDB_UNIT_TESTS(
asynchttplookuptest
asynccddblookuptest
synccddblookuptest
......@@ -29,8 +29,7 @@ set(kcddb_unittests
cdinfotest
)
KCDDB_BUILD_TESTS(
${kcddb_unittests}
KCDDB_EXECUTABLE_TESTS(
syncsmtpsubmittest
asyncsmtpsubmittest
asynchttpsubmittest
......@@ -38,5 +37,3 @@ KCDDB_BUILD_TESTS(
sitestest
)
KCDDB_EXECUTE_TESTS(
${kcddb_unittests})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment