CMakeLists.txt 2.53 KB
Newer Older
Ken Martin's avatar
Ken Martin committed
1
2
SET(KIT Hybrid)
# add tests that do not require data
Christian Charles's avatar
Christian Charles committed
3
SET(MyTests   
4
  TestImageStencilData.cxx
5
  X3DTest.cxx  
Ken Martin's avatar
Ken Martin committed
6
7
8
  )
IF (VTK_DATA_ROOT)
  # add tests that require data
9
  SET(MyTests ${MyTests}
10
    TestBarChartActor.cxx
11
    TestExodusImplicitArrays.cxx
12
    #TestLabelPlacerExodus.cxx
13
    TestLegendScaleActor.cxx
14
    TestPolyDataSilhouette.cxx
15
16
    TestPieChartActor.cxx
    TestSpiderPlotActor.cxx
17
    TestVRMLNormals.cxx
18
    TestTDxGeo.cxx
Ken Martin's avatar
Ken Martin committed
19
    )
20
21
  # Temporarily disable LIC tests on Mac platforms
  IF (VTK_USE_GLSL_SHADERS AND NOT APPLE)
22
23
24
25
26
27
    SET(MyTests ${MyTests}
      TestImageDataLIC2D.cxx
      TestStructuredGridLIC2DXSlice.cxx
      TestStructuredGridLIC2DYSlice.cxx
      TestStructuredGridLIC2DZSlice.cxx
      )
28
  ENDIF ()
Ken Martin's avatar
Ken Martin committed
29
ENDIF (VTK_DATA_ROOT)
Ken Martin's avatar
Ken Martin committed
30

31
# remove some tests if there is no display of if they need args
Ken Martin's avatar
Ken Martin committed
32
IF(NOT VTK_USE_DISPLAY)
Christian Charles's avatar
Christian Charles committed
33
  REMOVE(MyTests
34
35
36
    TestBarChartActor.cxx
    TestLegendScaleActor.cxx
    TestPieChartActor.cxx
37
    TestPolyDataSilhouette.cxx
38
    TestSpiderPlotActor.cxx
Christian Charles's avatar
Christian Charles committed
39
    X3DTest.cxx     
40
    ) 
Ken Martin's avatar
Ken Martin committed
41
ENDIF(NOT VTK_USE_DISPLAY)
42
 
43
44
45
46
47
48
IF (VTK_DATA_ROOT)
  ADD_TEST(TestPolyDataSilhouette ${CXX_TEST_PATH}/${KIT}CxxTests
           TestPolyDataSilhouette ${VTK_DATA_ROOT}/Data/cow.vtp)
ENDIF (VTK_DATA_ROOT)

INCLUDE(${VTK_SOURCE_DIR}/Rendering/vtkTestingObjectFactory.cmake)
49

Ken Martin's avatar
Ken Martin committed
50
ADD_EXECUTABLE(${KIT}CxxTests ${Tests})
51
TARGET_LINK_LIBRARIES(${KIT}CxxTests vtkHybrid vtkRendering vtkImaging vtkIO )
Ken Martin's avatar
Ken Martin committed
52
SET (TestsToRun ${Tests})
53
REMOVE (TestsToRun ${KIT}CxxTests.cxx TestPolyDataSilhouette.cxx TestImageStencilData.cxx)
Brad King's avatar
Brad King committed
54

Ken Martin's avatar
Ken Martin committed
55
56
57
58
#
# Add all the executables 
FOREACH (test ${TestsToRun})
  GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
59
  IF (VTK_DATA_ROOT)
Ken Martin's avatar
Ken Martin committed
60
61
62
    ADD_TEST(${TName} ${CXX_TEST_PATH}/${KIT}CxxTests ${TName}
        -D ${VTK_DATA_ROOT}
        -V Baseline/${KIT}/${TName}.png)
63
  ELSE (VTK_DATA_ROOT)
Ken Martin's avatar
Ken Martin committed
64
    ADD_TEST(${TName} ${CXX_TEST_PATH}/${KIT}CxxTests ${TName})
65
  ENDIF (VTK_DATA_ROOT)
Ken Martin's avatar
Ken Martin committed
66
ENDFOREACH (test) 
67

68
IF(VTK_DATA_ROOT AND VTK_USE_DISPLAY)
69
70
71
72
73
74
75
76
77
  ADD_TEST(TestAddStencilData ${CXX_TEST_PATH}/${KIT}CxxTests 
         TestImageStencilData 1
        -T ${VTK_BINARY_DIR}/Testing/Temporary
        -D ${VTK_DATA_ROOT}
        -V Baseline/${KIT}/TestAddStencilData.png)
  ADD_TEST(TestSubtractStencilData ${CXX_TEST_PATH}/${KIT}CxxTests 
         TestImageStencilData 2
        -D ${VTK_DATA_ROOT}
        -V Baseline/${KIT}/TestSubtractStencilData.png)
78
79
80
81
  ADD_TEST(TestClipStencilData ${CXX_TEST_PATH}/${KIT}CxxTests 
         TestImageStencilData 3 
        -D ${VTK_DATA_ROOT}
        -V Baseline/${KIT}/TestClipStencilData.png)
82
ENDIF(VTK_DATA_ROOT AND VTK_USE_DISPLAY)