CMakeLists.txt 6.6 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
    TestBackfaceCulling.cxx
23
    TestBlurAndSobelPasses.cxx
24
    TestDynamic2DLabelMapper.cxx
Francois Bertel's avatar
Francois Bertel committed
25
    TestFBO.cxx
26
    TestFollowerPicking.cxx
27
    TestGaussianBlurPass.cxx
28
29
30
31
    TestGlyph3DMapper.cxx
    TestGlyph3DMapperMasking.cxx
    TestGlyph3DMapperOrientationArray.cxx
    TestGlyph3DMapperPicking.cxx
32
    TestGPUInfo.cxx
33
    TestGradientBackground.cxx
34
    TestHomogeneousTransformOfActor.cxx
35
    TestImageResliceMapperAlpha.cxx
36
    TestImageResliceMapperBackground.cxx
37
38
39
40
    TestImageResliceMapperBorder.cxx
    TestImageResliceMapperInterpolation.cxx
    TestImageResliceMapperOffAxis.cxx
    TestImageResliceMapperOrient3D.cxx
41
    TestImageResliceMapperSlab.cxx
42
    TestImageSliceMapperAlpha.cxx
43
    TestImageSliceMapperBackground.cxx
44
45
46
47
    TestImageSliceMapperBorder.cxx
    TestImageSliceMapperOrient2D.cxx
    TestImageSliceMapperOrient3D.cxx
    TestImageSliceMapperInterpolation.cxx
David Gobbi's avatar
David Gobbi committed
48
    TestImageStack.cxx
49
    TestInteractorTimers.cxx
50
    TestLabelPlacer.cxx
51
    TestLabelPlacer2D.cxx
52
    TestLabelPlacerCoincidentPoints.cxx
Jeff Baumes's avatar
Jeff Baumes committed
53
54
    TestLabelPlacementMapper2D.cxx
    TestLabelPlacementMapperCoincidentPoints.cxx
Francois Bertel's avatar
Francois Bertel committed
55
    TestLightActor.cxx
56
    TestLODActor.cxx
57
    TestManyActors.cxx
58
#    TestOffAxisStereo.cxx
59
    TestOrderedTriangulator.cxx
60
    TestOpacity.cxx
61
    TestOpenGLPolyDataMapper.cxx
Francois Bertel's avatar
Francois Bertel committed
62
    TestOSConeCxx.cxx
63
    TestPOVExporter.cxx
64
    TestResetCameraVerticalAspectRatio.cxx
65
    TestResetCameraVerticalAspectRatioParallel.cxx
66
    TestSetImageOrientation.cxx
67
    TestSobelGradientMagnitudePass.cxx
Francois Bertel's avatar
Francois Bertel committed
68
    TestShadowMapPass.cxx
69
70
    TestTextActorAlphaBlending.cxx
    TestTextActorDepthPeeling.cxx
71
72
    TestTextActor3DAlphaBlending.cxx
    TestTextActor3DDepthPeeling.cxx
73
    TestTexturedBackground.cxx
74
    TestTextureSize.cxx
75
    TestTDx.cxx
76
    TestTilingCxx.cxx
77
    TestTransformCoordinateUseDouble.cxx
78
79
    TestTranslucentLUTAlphaBlending.cxx
    TestTranslucentLUTDepthPeeling.cxx
80
    TestTranslucentLUTDepthPeelingPass.cxx
81
    TestTranslucentLUTTextureAlphaBlending.cxx
82
    TestTranslucentLUTTextureDepthPeeling.cxx
83
    )
84

85
86
87
88
89
90
91
  IF(WIN32 AND NOT VTK_USE_X)
    SET(RenderingTestsWithArguments
      ${RenderingTestsWithArguments}
      TestWin32OpenGLRenderWindow.cxx
      )
  ENDIF(WIN32 AND NOT VTK_USE_X)

92
  IF(VTK_DATA_ROOT)
93
94
95
    SET(RenderingTestsWithArguments
      ${RenderingTestsWithArguments}
      TestAreaSelections.cxx
96
97
      TestMultiTexturing.cxx
      TestMultiTexturingTransform.cxx
98
      TestGlyph3DMapperArrow.cxx
99
      TestScalarBar.cxx
100
      TestScenePicker.cxx
101
102
103
104
105
106
107
108
      TestTextureRGBA.cxx
      TestTextureRGBADepthPeeling.cxx
      TestTranslucentImageActorAlphaBlending.cxx
      TestTranslucentImageActorDepthPeeling.cxx
      TestTStripsColorsTCoords.cxx
      TestTStripsNormalsColorsTCoords.cxx
      TestTStripsNormalsTCoords.cxx
      TestTStripsTCoords.cxx
109
      )
110
  ENDIF(VTK_DATA_ROOT)
111

112
  IF(VTK_USE_DISPLAY AND VTK_DATA_ROOT)
113
114
  SET(RenderingTestsWithArguments
      ${RenderingTestsWithArguments}
115
      RenderNonFinite.cxx
116
117
      SurfacePlusEdges.cxx
      TestLabelPlacementMapper.cxx
118
      )
119
120
  ENDIF(VTK_USE_DISPLAY AND VTK_DATA_ROOT)

121
122
123
124
125
  IF (VTK_USE_GLSL_SHADERS)
    # Tests testing GLSL Shaders.
    SET(RenderingTestsWithArguments
      ${RenderingTestsWithArguments}
      TestGenericVertexAttributesGLSLCxx.cxx
126
127
      TestGenericVertexAttributesGLSLAlphaBlending.cxx
      TestGenericVertexAttributesGLSLDepthPeelingPass.cxx
128
      )
129
130
    # Temporarily disable LIC tests on Mac
    IF(NOT APPLE)
131
132
133
134
135
      IF (VTK_DATA_ROOT)
        SET( RenderingTestsWithArguments
        ${RenderingTestsWithArguments}
        TestSurfaceLIC.cxx
        )
Dave Partyka's avatar
Dave Partyka committed
136
      ENDIF (VTK_DATA_ROOT)
137
    ENDIF()
138
139
  ENDIF (VTK_USE_GLSL_SHADERS)

140
141
142
ENDIF(VTK_USE_DISPLAY)

CREATE_TEST_SOURCELIST(Tests ${KIT}CxxTests.cxx
Ken Martin's avatar
Ken Martin committed
143
  ${RenderingTests};${RenderingTestsWithArguments}
144
  EXTRA_INCLUDE vtkTestDriver.h
145
  )
Ken Martin's avatar
Ken Martin committed
146

147
148
SET (TEST_FBO_IMPLEMENTATION_EXE
  TestFBOImplementation)
149
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/TestFBOInclude.h.in
150
151
152
153
154
155
156
157
158
  ${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
159
  vtkRendering ${OPENGL_gl_LIBRARY})
160

161
162
163
164
IF (VTK_OPENGL_HAS_OSMESA AND OSMESA_LIBRARY)
  TARGET_LINK_LIBRARIES(TestFBOImplementation ${OSMESA_LIBRARY})
ENDIF (VTK_OPENGL_HAS_OSMESA AND OSMESA_LIBRARY)

165
ADD_EXECUTABLE(${KIT}CxxTests ${Tests})
166
TARGET_LINK_LIBRARIES(${KIT}CxxTests vtkRendering vtkIO ${OPENGL_gl_LIBRARY})
167

168
169
170
IF (VTK_OPENGL_HAS_OSMESA AND OSMESA_LIBRARY)
  TARGET_LINK_LIBRARIES(${KIT}CxxTests ${OSMESA_LIBRARY})
ENDIF (VTK_OPENGL_HAS_OSMESA AND OSMESA_LIBRARY)
Ken Martin's avatar
Ken Martin committed
171
172

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

Ken Martin's avatar
updates  
Ken Martin committed
175
#
176
# Add all the executables
Ken Martin's avatar
Ken Martin committed
177
FOREACH (test ${RenderingTests})
Ken Martin's avatar
Ken Martin committed
178
  GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
179
180
  ADD_TEST(${TName} ${CXX_TEST_PATH}/${KIT}CxxTests ${TName}
    -T ${VTK_BINARY_DIR}/Testing/Temporary
181
182
    )
ENDFOREACH (test)
Ken Martin's avatar
Ken Martin committed
183

Ken Martin's avatar
Ken Martin committed
184
185
186
187
188
189
190
191
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)
192
193
194
    ADD_TEST(${TName} ${CXX_TEST_PATH}/${KIT}CxxTests ${TName}
      -T ${VTK_BINARY_DIR}/Testing/Temporary
      )
Ken Martin's avatar
Ken Martin committed
195
196
197
  ENDIF (VTK_DATA_ROOT)
ENDFOREACH(test)

Ken Martin's avatar
Ken Martin committed
198
199
#
# Add other odd tests or executables
Ken Martin's avatar
updates  
Ken Martin committed
200
#
Brad King's avatar
Brad King committed
201
FOREACH (exe
202
203
    TimeRenderer
    TimeRenderer2
Francois Bertel's avatar
Francois Bertel committed
204
    VTKBenchMark
205
    )
Brad King's avatar
Brad King committed
206
  ADD_EXECUTABLE(${exe} ${exe}.cxx)
207
  TARGET_LINK_LIBRARIES(${exe} vtkRendering vtkIO ${OPENGL_gl_LIBRARY})
208
  IF (APPLE)
Andy Cedilnik's avatar
Andy Cedilnik committed
209
    TARGET_LINK_LIBRARIES(${exe} "-framework GLUT")
210
  ENDIF (APPLE)
211
212
213
  IF (VTK_OPENGL_HAS_OSMESA AND OSMESA_LIBRARY)
    TARGET_LINK_LIBRARIES(${exe} ${OSMESA_LIBRARY})
  ENDIF (VTK_OPENGL_HAS_OSMESA AND OSMESA_LIBRARY)
Brad King's avatar
Brad King committed
214
ENDFOREACH (exe)
215
216
217
218

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)