CMakeLists.txt 2.1 KB

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