CMakeLists.txt 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. SET(KIT ${PROJECT_NAME})
  2. #
  3. # Tests
  4. #
  5. SET(TEST_SOURCES
  6. ctkTransferFunctionBarsItemTest1.cpp
  7. ctkTransferFunctionViewTest1.cpp
  8. ctkTransferFunctionViewTest2.cpp
  9. ctkTransferFunctionViewTest3.cpp
  10. ctkTransferFunctionViewTest4.cpp
  11. ctkTransferFunctionViewTest5.cpp
  12. ctkVTKTextPropertyWidgetTest1.cpp
  13. )
  14. IF(CTK_USE_CHARTS)
  15. SET(TEST_SOURCES
  16. ctkVTKChartViewTest1.cpp
  17. ctkVTKScalarsToColorsViewTest1.cpp
  18. ctkVTKScalarsToColorsViewTest2.cpp
  19. ctkVTKScalarsToColorsViewTest3.cpp
  20. ctkVTKScalarsToColorsViewTest4.cpp
  21. ctkVTKScalarsToColorsWidgetTest1.cpp
  22. ${TEST_SOURCES})
  23. ENDIF(CTK_USE_CHARTS)
  24. #
  25. # Tests expecting CTKData to be set
  26. #
  27. IF(EXISTS "${CTKData_DIR}")
  28. LIST(APPEND TEST_SOURCES
  29. ctkVTKSliceViewTest1.cpp
  30. ctkVTKRenderViewTest1.cpp
  31. )
  32. ENDIF()
  33. CREATE_TEST_SOURCELIST(Tests ${KIT}CppTests.cpp
  34. ${TEST_SOURCES}
  35. #EXTRA_INCLUDE TestingMacros.h
  36. )
  37. SET (TestsToRun ${Tests})
  38. REMOVE (TestsToRun ${KIT}CppTests.cpp)
  39. SET(LIBRARY_NAME ${PROJECT_NAME})
  40. ADD_EXECUTABLE(${KIT}CppTests ${Tests})
  41. TARGET_LINK_LIBRARIES(${KIT}CppTests ${LIBRARY_NAME} vtkCharts ${CTK_BASE_LIBRARIES})
  42. SET( KIT_TESTS ${CPP_TEST_PATH}/${KIT}CppTests)
  43. MACRO( SIMPLE_TEST TESTNAME )
  44. ADD_TEST( ${TESTNAME} ${KIT_TESTS} ${TESTNAME} -D "${CTKData_DIR}/Data")
  45. SET_PROPERTY(TEST ${TESTNAME} PROPERTY LABELS ${PROJECT_NAME})
  46. ENDMACRO( SIMPLE_TEST )
  47. #
  48. # Add Tests
  49. #
  50. SIMPLE_TEST( ctkTransferFunctionBarsItemTest1 )
  51. SIMPLE_TEST( ctkTransferFunctionViewTest1 )
  52. SIMPLE_TEST( ctkTransferFunctionViewTest2 )
  53. SIMPLE_TEST( ctkTransferFunctionViewTest3 )
  54. SIMPLE_TEST( ctkTransferFunctionViewTest4 )
  55. SIMPLE_TEST( ctkTransferFunctionViewTest5 )
  56. IF (CTK_USE_CHARTS)
  57. SIMPLE_TEST( ctkVTKChartViewTest1 )
  58. SIMPLE_TEST( ctkVTKScalarsToColorsViewTest1 )
  59. SIMPLE_TEST( ctkVTKScalarsToColorsViewTest2 )
  60. SIMPLE_TEST( ctkVTKScalarsToColorsViewTest3 )
  61. SIMPLE_TEST( ctkVTKScalarsToColorsViewTest4 )
  62. SIMPLE_TEST( ctkVTKScalarsToColorsWidgetTest1 )
  63. ENDIF(CTK_USE_CHARTS)
  64. SIMPLE_TEST( ctkVTKTextPropertyWidgetTest1 )
  65. #
  66. # Add Tests expecting CTKData to be set
  67. #
  68. IF(EXISTS "${CTKData_DIR}")
  69. #
  70. SIMPLE_TEST( ctkVTKSliceViewTest1 )
  71. SIMPLE_TEST( ctkVTKRenderViewTest1 )
  72. ENDIF()