on xenial help sign in
Run the test on qmluitests
7b47f47Albert Astals
tests/plugins/ListViewWithPageHeader/CMakeLists.txt+8−20
@@ -13,24 +13,12 @@ remove_definitions(-DQT_NO_KEYWORDS)
13add_definitions(-DLISTVIEWWITHPAGEHEADER_FOLDER="${CMAKE_CURRENT_SOURCE_DIR}")
13add_definitions(-DLISTVIEWWITHPAGEHEADER_FOLDER="${CMAKE_CURRENT_SOURCE_DIR}")
14add_definitions(-DBUILT_PLUGINS_DIR="${CMAKE_BINARY_DIR}/plugins")
14add_definitions(-DBUILT_PLUGINS_DIR="${CMAKE_BINARY_DIR}/plugins")
15
15
16−macro(run_tests)
17− set(_test_list "")
18− foreach(_test ${ARGN})
19− set(testCommand ${CMAKE_CURRENT_BINARY_DIR}/${_test}Exec
16+set(testCommand ${CMAKE_CURRENT_BINARY_DIR}/listviewwithpageheadertestExec
20− -o ${CMAKE_BINARY_DIR}/${_test}.xml,xunitxml
17+ -o ${CMAKE_BINARY_DIR}/listviewwithpageheadertest.xml,xunitxml
21− -o -,txt)
18+ -o -,txt)
22− add_test(NAME ${_test} COMMAND ${testCommand})
23− add_custom_target(${_test} ${testCommand})
19+add_custom_target(testlistviewwithpageheader ${testCommand})
24− add_executable(${_test}Exec ${_test}.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/ListViewWithPageHeader/listviewwithpageheader.cpp)
20+add_dependencies(qmluitests testlistviewwithpageheader)
25− qt5_use_modules(${_test}Exec Test Core Qml)
26− target_link_libraries(${_test}Exec
27− ${Qt5Gui_LIBRARIES}
28− ${Qt5Quick_LIBRARIES}
29− )
30− set(_test_list "${_test_list};${_test}")
31− endforeach()
32−endmacro(run_tests)
33
21
34−run_tests(
22+add_executable(listviewwithpageheadertestExec listviewwithpageheadertest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../../plugins/ListViewWithPageHeader/listviewwithpageheader.cpp)
35− listviewwithpageheadertest
23+qt5_use_modules(listviewwithpageheadertestExec Test Core Qml)
36− )
24+target_link_libraries(listviewwithpageheadertestExec ${Qt5Gui_LIBRARIES} ${Qt5Quick_LIBRARIES})