CMakeLists.txt 5.22 KB
Newer Older
Ken Martin's avatar
Ken Martin committed
1
SET(KIT Rendering)
2
3

SET(RenderingTests
Ken Martin's avatar
Ken Martin committed
4
  otherCoordinate.cxx
5
  TestPriorityStreaming.cxx
6
7
  )

Ken Martin's avatar
Ken Martin committed
8
9
SET(RenderingTestsWithArguments)

10
11
12
13
14
INCLUDE_DIRECTORIES(
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
)

15
IF(VTK_USE_DISPLAY)
16
  # For tests that actually use a vtkRenderWindow
Ken Martin's avatar
Ken Martin committed
17
18
  SET(RenderingTestsWithArguments
    ${RenderingTestsWithArguments}
19
    LoadOpenGLExtension.cxx
20
    TestActorLightingFlag.cxx
21
    TestAnimationScene.cxx
22
    TestBlurAndSobelPasses.cxx
23
    TestDynamic2DLabelMapper.cxx
Francois Bertel's avatar
Francois Bertel committed
24
    TestFBO.cxx
25
    TestGaussianBlurPass.cxx
26
27
28
29
    TestGlyph3DMapper.cxx
    TestGlyph3DMapperMasking.cxx
    TestGlyph3DMapperOrientationArray.cxx
    TestGlyph3DMapperPicking.cxx
30
    TestGPUInfo.cxx
31
    TestGradientBackground.cxx
32
    TestInteractorTimers.cxx
33
    TestLabelPlacer.cxx
34
    TestLabelPlacer2D.cxx
35
    TestLabelPlacerCoincidentPoints.cxx
Jeff Baumes's avatar
Jeff Baumes committed
36
37
    TestLabelPlacementMapper2D.cxx
    TestLabelPlacementMapperCoincidentPoints.cxx
Francois Bertel's avatar
Francois Bertel committed
38
    TestLightActor.cxx
39
    TestLODActor.cxx
40
    TestManyActors.cxx
41
    TestOrderedTriangulator.cxx
42
    TestOpacity.cxx
43
    TestOpenGLPolyDataMapper.cxx
Francois Bertel's avatar
Francois Bertel committed
44
    TestOSConeCxx.cxx
45
    TestPOVExporter.cxx
46
    TestResetCameraVerticalAspectRatio.cxx
47
    TestResetCameraVerticalAspectRatioParallel.cxx
48
    TestSobelGradientMagnitudePass.cxx
Francois Bertel's avatar
Francois Bertel committed
49
    TestShadowMapPass.cxx
50
51
    TestTextActorAlphaBlending.cxx
    TestTextActorDepthPeeling.cxx
52
53
    TestTextActor3DAlphaBlending.cxx
    TestTextActor3DDepthPeeling.cxx
54
    TestTexturedBackground.cxx
55
    TestTDx.cxx
56
    TestTilingCxx.cxx
57
58
    TestTranslucentLUTAlphaBlending.cxx
    TestTranslucentLUTDepthPeeling.cxx
59
    TestTranslucentLUTDepthPeelingPass.cxx
60
    TestTranslucentLUTTextureAlphaBlending.cxx
61
    TestTranslucentLUTTextureDepthPeeling.cxx
62
    )
63

64
  IF(VTK_DATA_ROOT)
65
66
67
    SET(RenderingTestsWithArguments
      ${RenderingTestsWithArguments}
      TestAreaSelections.cxx
68
69
      TestMultiTexturing.cxx
      TestMultiTexturingTransform.cxx
70
      TestGlyph3DMapperArrow.cxx
71
      TestScenePicker.cxx
72
73
74
75
76
77
78
79
      TestTextureRGBA.cxx
      TestTextureRGBADepthPeeling.cxx
      TestTranslucentImageActorAlphaBlending.cxx
      TestTranslucentImageActorDepthPeeling.cxx
      TestTStripsColorsTCoords.cxx
      TestTStripsNormalsColorsTCoords.cxx
      TestTStripsNormalsTCoords.cxx
      TestTStripsTCoords.cxx
80
      )
81
  ENDIF(VTK_DATA_ROOT)
82

83
  IF(VTK_USE_DISPLAY AND VTK_DATA_ROOT)
84
85
  SET(RenderingTestsWithArguments
      ${RenderingTestsWithArguments}
86
      RenderNonFinite.cxx
87
88
      SurfacePlusEdges.cxx
      TestLabelPlacementMapper.cxx
89
      )
90
91
  ENDIF(VTK_USE_DISPLAY AND VTK_DATA_ROOT)

92
93
94
95
96
  IF (VTK_USE_GLSL_SHADERS)
    # Tests testing GLSL Shaders.
    SET(RenderingTestsWithArguments
      ${RenderingTestsWithArguments}
      TestGenericVertexAttributesGLSLCxx.cxx
97
98
      TestGenericVertexAttributesGLSLAlphaBlending.cxx
      TestGenericVertexAttributesGLSLDepthPeelingPass.cxx
99
      )
100
101
    # Temporarily disable LIC tests on Mac
    IF(NOT APPLE)
102
103
104
105
106
      IF (VTK_DATA_ROOT)
        SET( RenderingTestsWithArguments
        ${RenderingTestsWithArguments}
        TestSurfaceLIC.cxx
        )
Dave Partyka's avatar
Dave Partyka committed
107
      ENDIF (VTK_DATA_ROOT)
108
    ENDIF()
109
110
  ENDIF (VTK_USE_GLSL_SHADERS)

111
112
113
ENDIF(VTK_USE_DISPLAY)

CREATE_TEST_SOURCELIST(Tests ${KIT}CxxTests.cxx
Ken Martin's avatar
Ken Martin committed
114
  ${RenderingTests};${RenderingTestsWithArguments}
115
  EXTRA_INCLUDE vtkTestDriver.h
116
  )
Ken Martin's avatar
Ken Martin committed
117

118
119
SET (TEST_FBO_IMPLEMENTATION_EXE
  TestFBOImplementation)
120
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/TestFBOInclude.h.in
121
122
123
124
125
126
127
128
129
  ${CMAKE_CURRENT_BINARY_DIR}/TestFBOInclude.h
  @ONLY IMMEDIATE ESCAPE_QUOTES)

# This is used by TestFBO. Using a separate processes makes is possible to
# avoid issues to OpenGL implementations segfaulting etc. from affecting the
# test.
ADD_EXECUTABLE(TestFBOImplementation
  TestFBOImplementation.cxx)
TARGET_LINK_LIBRARIES(TestFBOImplementation
130
  vtkRendering ${OPENGL_gl_LIBRARY})
131

132
ADD_EXECUTABLE(${KIT}CxxTests ${Tests})
133
TARGET_LINK_LIBRARIES(${KIT}CxxTests vtkRendering vtkIO ${OPENGL_gl_LIBRARY})
134

Ken Martin's avatar
Ken Martin committed
135
136

SET (TestsToRun ${Tests})
137
REMOVE (TestsToRun ${KIT}CxxTests.cxx)
Ken Martin's avatar
Ken Martin committed
138

Ken Martin's avatar
updates  
Ken Martin committed
139
#
140
# Add all the executables
Ken Martin's avatar
Ken Martin committed
141
FOREACH (test ${RenderingTests})
Ken Martin's avatar
Ken Martin committed
142
  GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
143
144
  ADD_TEST(${TName} ${CXX_TEST_PATH}/${KIT}CxxTests ${TName}
    -T ${VTK_BINARY_DIR}/Testing/Temporary
145
146
    )
ENDFOREACH (test)
Ken Martin's avatar
Ken Martin committed
147

Ken Martin's avatar
Ken Martin committed
148
149
150
151
152
153
154
155
FOREACH (test ${RenderingTestsWithArguments})
  GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
  IF (VTK_DATA_ROOT)
    ADD_TEST(${TName} ${CXX_TEST_PATH}/${KIT}CxxTests ${TName}
        -D ${VTK_DATA_ROOT}
        -T ${VTK_BINARY_DIR}/Testing/Temporary
        -V Baseline/${KIT}/${TName}.png)
  ELSE (VTK_DATA_ROOT)
156
157
158
    ADD_TEST(${TName} ${CXX_TEST_PATH}/${KIT}CxxTests ${TName}
      -T ${VTK_BINARY_DIR}/Testing/Temporary
      )
Ken Martin's avatar
Ken Martin committed
159
160
161
  ENDIF (VTK_DATA_ROOT)
ENDFOREACH(test)

Ken Martin's avatar
Ken Martin committed
162
163
#
# Add other odd tests or executables
Ken Martin's avatar
updates  
Ken Martin committed
164
#
Brad King's avatar
Brad King committed
165
FOREACH (exe
166
167
    TimeRenderer
    TimeRenderer2
Francois Bertel's avatar
Francois Bertel committed
168
    VTKBenchMark
169
    )
Brad King's avatar
Brad King committed
170
  ADD_EXECUTABLE(${exe} ${exe}.cxx)
171
  TARGET_LINK_LIBRARIES(${exe} vtkRendering vtkIO ${OPENGL_gl_LIBRARY})
172
  IF (APPLE)
Andy Cedilnik's avatar
Andy Cedilnik committed
173
    TARGET_LINK_LIBRARIES(${exe} "-framework GLUT")
174
  ENDIF (APPLE)
Brad King's avatar
Brad King committed
175
ENDFOREACH (exe)
176
177
178
179

IF(VTK_USE_GLSL_SHADERS AND VTK_USE_DISPLAY)
  set_tests_properties(TestGenericVertexAttributesGLSLDepthPeelingPass PROPERTIES FAIL_REGULAR_EXPRESSION "ERROR:.*vtkOpenGLProperty.*Couldn't build the shader program. At this point , it can be an error in a shader or a driver bug.")
ENDIF(VTK_USE_GLSL_SHADERS AND VTK_USE_DISPLAY)