CMakeLists.txt 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. set(KIT ${PROJECT_NAME})
  2. create_test_sourcelist(Tests ${KIT}CppTests.cpp
  3. ctkDICOMAppWidgetTest1.cpp
  4. ctkDICOMDatasetViewTest1.cpp
  5. ctkDICOMDirectoryListWidgetTest1.cpp
  6. ctkDICOMImageTest1.cpp
  7. ctkDICOMImportWidgetTest1.cpp
  8. ctkDICOMListenerWidgetTest1.cpp
  9. ctkDICOMModelTest2.cpp
  10. ctkDICOMQueryResultsTabWidgetTest1.cpp
  11. ctkDICOMQueryRetrieveWidgetTest1.cpp
  12. ctkDICOMServerNodeWidgetTest1.cpp
  13. ctkDICOMThumbnailListWidgetTest1.cpp
  14. )
  15. SET (TestsToRun ${Tests})
  16. REMOVE (TestsToRun ${KIT}CppTests.cpp)
  17. set(LIBRARY_NAME ${PROJECT_NAME})
  18. add_executable(${KIT}CppTests ${Tests})
  19. target_link_libraries(${KIT}CppTests ${LIBRARY_NAME})
  20. set( KIT_TESTS ${CPP_TEST_PATH}/${KIT}CppTests)
  21. macro( SIMPLE_TEST TESTNAME )
  22. add_test( ${TESTNAME} ${KIT_TESTS} ${TESTNAME} )
  23. set_property(TEST ${TESTNAME} PROPERTY LABELS ${PROJECT_NAME})
  24. endmacro( SIMPLE_TEST )
  25. #
  26. # Add Tests
  27. #
  28. SIMPLE_TEST(ctkDICOMAppWidgetTest1)
  29. add_test( ctkDICOMDatasetViewTest1 ${KIT_TESTS}
  30. ctkDICOMDatasetViewTest1 ${CTKData_DIR}/Data/DICOM/MRHEAD/000055.IMA)
  31. set_property(TEST ctkDICOMDatasetViewTest1 PROPERTY LABELS ${PROJECT_NAME})
  32. SIMPLE_TEST(ctkDICOMDirectoryListWidgetTest1)
  33. add_test( ctkDICOMImageTest1 ${KIT_TESTS}
  34. ctkDICOMImageTest1 ${CTKData_DIR}/Data/DICOM/MRHEAD/000055.IMA)
  35. set_property(TEST ctkDICOMImageTest1 PROPERTY LABELS ${PROJECT_NAME})
  36. SIMPLE_TEST(ctkDICOMImportWidgetTest1)
  37. SIMPLE_TEST(ctkDICOMListenerWidgetTest1)
  38. add_test( ctkDICOMModelTest2 ${KIT_TESTS}
  39. ctkDICOMModelTest2 ${CMAKE_CURRENT_BINARY_DIR}/dicom.db
  40. ${CMAKE_CURRENT_SOURCE_DIR}/../../../Core/Resources/dicom-sample.sql)
  41. set_property(TEST ctkDICOMModelTest2 PROPERTY LABELS ${PROJECT_NAME})
  42. SIMPLE_TEST(ctkDICOMQueryRetrieveWidgetTest1)
  43. SIMPLE_TEST(ctkDICOMQueryResultsTabWidgetTest1)
  44. SIMPLE_TEST(ctkDICOMThumbnailListWidgetTest1)