Use ecm_add_tests instead of custom macro

This fixes running nmake test on Windows
wilder
Alex Richardson 12 years ago
parent 5edef6938c
commit b3408b7765
  1. 31
      autotests/CMakeLists.txt

@ -12,23 +12,20 @@ find_package(Qt5 5.2.0 CONFIG REQUIRED Test Widgets)
add_subdirectory(proxymodeltestsuite) add_subdirectory(proxymodeltestsuite)
include(ECMMarkAsTest) include(ECMAddTests)
macro(kitemmodels_proxymodel_tests) ecm_add_tests(
foreach(_testname ${ARGN}) kdescendantsproxymodeltest.cpp
add_executable(${_testname} ${_testname}.cpp ${proxyModelTestSources} ) klinkitemselectionmodeltest.cpp
add_test(kitemmodels-${_testname} ${_testname}) testmodelqueuedconnections.cpp
ecm_mark_as_test(${_testname}) NAME_PREFIX "kitemmodels-"
target_link_libraries(${_testname} KF5::ItemModels Qt5::Test Qt5::Widgets proxymodeltestsuite ) LINK_LIBRARIES KF5::ItemModels Qt5::Test Qt5::Widgets proxymodeltestsuite
endforeach(_testname) )
endmacro()
#we need additional sources for this test, can't use it in ecm_add_tests
ecm_add_test(kselectionproxymodeltest.cpp ${proxyModelTestSources}
kitemmodels_proxymodel_tests( TEST_NAME "kitemmodels-kselectionproxymodeltest"
kdescendantsproxymodeltest LINK_LIBRARIES KF5::ItemModels Qt5::Test Qt5::Widgets proxymodeltestsuite
klinkitemselectionmodeltest
kselectionproxymodeltest
testmodelqueuedconnections
) )
if (Qt5Script_FOUND) if (Qt5Script_FOUND)

Loading…
Cancel
Save