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}/.. ) 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. MACRO(KCDDB_EXECUTABLE_TESTS)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
MACRO(KCDDB_BUILD_TESTS)
FOREACH(_testname ${ARGN}) FOREACH(_testname ${ARGN})
kde4_automoc(${_testname}.cpp) kde4_automoc(${_testname}.cpp)
kde4_add_test(${_testname} ${_testname}.cpp) kde4_add_test_executable(${_testname} ${_testname}.cpp)
target_link_libraries(${_testname} ${KDE4_KDEUI_LIBS} target_link_libraries(${_testname} ${KDE4_KDEUI_LIBS}
${QT_QTTEST_LIBRARY} kcddb) ${QT_QTTEST_LIBRARY} kcddb)
ENDFOREACH(_testname) ENDFOREACH(_testname)
ENDMACRO(KCDDB_BUILD_TESTS) ENDMACRO(KCDDB_EXECUTABLE_TESTS)
MACRO(KCDDB_EXECUTE_TESTS) MACRO(KCDDB_UNIT_TESTS)
FOREACH(_testname ${ARGN}) 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) ENDFOREACH(_testname)
ENDMACRO(KCDDB_EXECUTE_TESTS) ENDMACRO(KCDDB_UNIT_TESTS)
set(kcddb_unittests KCDDB_UNIT_TESTS(
asynchttplookuptest asynchttplookuptest
asynccddblookuptest asynccddblookuptest
synccddblookuptest synccddblookuptest
...@@ -29,8 +29,7 @@ set(kcddb_unittests ...@@ -29,8 +29,7 @@ set(kcddb_unittests
cdinfotest cdinfotest
) )
KCDDB_BUILD_TESTS( KCDDB_EXECUTABLE_TESTS(
${kcddb_unittests}
syncsmtpsubmittest syncsmtpsubmittest
asyncsmtpsubmittest asyncsmtpsubmittest
asynchttpsubmittest asynchttpsubmittest
...@@ -38,5 +37,3 @@ KCDDB_BUILD_TESTS( ...@@ -38,5 +37,3 @@ KCDDB_BUILD_TESTS(
sitestest 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