CMakeLists.txt 5.19 KB
Newer Older
Brad King's avatar
Brad King committed
1
vtk_add_test_cxx(NO_DATA NO_VALID
Ken Martin's avatar
Ken Martin committed
2
  otherCoordinate.cxx
3
  TestPriorityStreaming.cxx
4
5
  )

6
7
8
9
10
INCLUDE_DIRECTORIES(
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}
)

VTK Developers's avatar
VTK Developers committed
11
# For tests that actually use a vtkRenderWindow
12
vtk_add_test_cxx(
VTK Developers's avatar
VTK Developers committed
13
14
15
16
17
  LoadOpenGLExtension.cxx
  TestActorLightingFlag.cxx
  TestAnimationScene.cxx
  TestBackfaceCulling.cxx
  TestBlurAndSobelPasses.cxx
18
  TestDynamic2DLabelMapper.cxx
19
  TestFBO.cxx,NO_VALID
VTK Developers's avatar
VTK Developers committed
20
21
22
23
24
25
  TestFollowerPicking.cxx
  TestGaussianBlurPass.cxx
  TestGlyph3DMapper.cxx
  TestGlyph3DMapperMasking.cxx
  TestGlyph3DMapperOrientationArray.cxx
  TestGlyph3DMapperPicking.cxx
26
  TestGPUInfo.cxx,NO_VALID
VTK Developers's avatar
VTK Developers committed
27
28
  TestGradientBackground.cxx
  TestHomogeneousTransformOfActor.cxx
29
30
31
32
33
34
  TestImageResliceMapperAlpha.cxx
  TestImageResliceMapperBackground.cxx
  TestImageResliceMapperInterpolation.cxx
  TestImageResliceMapperOffAxis.cxx
  TestImageResliceMapperOrient3D.cxx
  TestImageResliceMapperSlab.cxx
VTK Developers's avatar
VTK Developers committed
35
36
37
38
39
  TestImageSliceMapperAlpha.cxx
  TestImageSliceMapperBackground.cxx
  TestImageSliceMapperOrient2D.cxx
  TestImageSliceMapperOrient3D.cxx
  TestImageSliceMapperInterpolation.cxx
40
  TestImageStack.cxx
41
42
  TestInteractorStyleImageProperty.cxx,NO_VALID
  TestInteractorTimers.cxx,NO_VALID
43
44
45
46
47
  TestLabelPlacer.cxx
  TestLabelPlacer2D.cxx
  TestLabelPlacerCoincidentPoints.cxx
  TestLabelPlacementMapper2D.cxx
  TestLabelPlacementMapperCoincidentPoints.cxx
VTK Developers's avatar
VTK Developers committed
48
  TestLightActor.cxx
49
50
  TestLODActor.cxx,NO_VALID
  TestManyActors.cxx,NO_VALID
51
  TestMonitors.cxx,NO_VALID
VTK Developers's avatar
VTK Developers committed
52
53
54
55
56
  TestOffAxisStereo.cxx
  TestOrderedTriangulator.cxx
  TestOpacity.cxx
  TestOpenGLPolyDataMapper.cxx
  TestOSConeCxx.cxx
57
  TestPolygonSelection.cxx
58
  TestPOVExporter.cxx,NO_VALID
VTK Developers's avatar
VTK Developers committed
59
60
  TestResetCameraVerticalAspectRatio.cxx
  TestResetCameraVerticalAspectRatioParallel.cxx
61
  TestSetImageOrientation.cxx
VTK Developers's avatar
VTK Developers committed
62
63
64
65
66
67
  TestSobelGradientMagnitudePass.cxx
  TestTextActorAlphaBlending.cxx
  TestTextActorDepthPeeling.cxx
  TestTextActor3DAlphaBlending.cxx
  TestTextActor3DDepthPeeling.cxx
  TestTexturedBackground.cxx
68
  TestTextureSize.cxx,NO_VALID
VTK Developers's avatar
VTK Developers committed
69
  TestTDx.cxx
70
  TestTilingCxx.cxx
VTK Developers's avatar
VTK Developers committed
71
72
73
74
75
76
77
  TestTransformCoordinateUseDouble.cxx
  TestTranslucentLUTAlphaBlending.cxx
  TestTranslucentLUTDepthPeeling.cxx
  TestTranslucentLUTDepthPeelingPass.cxx
  TestTranslucentLUTTextureAlphaBlending.cxx
  TestTranslucentLUTTextureDepthPeeling.cxx
  )
Brad King's avatar
Brad King committed
78
if(NOT APPLE)
79
  vtk_add_test_cxx(TestShadowMapPass.cxx)
80
81
endif()

VTK Developers's avatar
VTK Developers committed
82
if(WIN32 AND NOT VTK_USE_X)
83
  vtk_add_test_cxx(TestWin32OpenGLRenderWindow.cxx NO_VALID)
VTK Developers's avatar
VTK Developers committed
84
endif()
85

86
87
include_directories(${OPENGL_INCLUDE_DIR})

88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
vtk_add_test_cxx(
  TestAreaSelections.cxx
  TestGlyph3DMapperArrow.cxx
  TestMultiblockDisplayProperties.cxx
  TestMultiTexturing.cxx
  TestMultiTexturingTransform.cxx
  TestImageSliceMapperBorder.cxx
  TestImageResliceMapperBorder.cxx
  TestScalarBar.cxx
  TestScenePicker.cxx,NO_VALID
  TestTextureRGBA.cxx
  TestTextureRGBADepthPeeling.cxx
  TestTranslucentImageActorAlphaBlending.cxx
  TestTranslucentImageActorDepthPeeling.cxx
  TestTStripsColorsTCoords.cxx
  TestTStripsNormalsColorsTCoords.cxx
  TestTStripsNormalsTCoords.cxx
  TestTStripsTCoords.cxx
  )
VTK Developers's avatar
VTK Developers committed
107

108
if(VTK_USE_DISPLAY)
109
  vtk_add_test_cxx(
VTK Developers's avatar
VTK Developers committed
110
111
112
113
114
115
    RenderNonFinite.cxx
    SurfacePlusEdges.cxx
    TestLabelPlacementMapper.cxx
    )
endif()

116
set(VTK_USE_GLSL_SHADERS FALSE)
VTK Developers's avatar
VTK Developers committed
117
118
if(VTK_USE_GLSL_SHADERS)
  # Tests testing GLSL Shaders.
119
  vtk_add_test_cxx(
VTK Developers's avatar
VTK Developers committed
120
121
122
123
124
    TestGenericVertexAttributesGLSLCxx.cxx
    TestGenericVertexAttributesGLSLAlphaBlending.cxx
    TestGenericVertexAttributesGLSLDepthPeelingPass.cxx
    )
endif()
125

Brad King's avatar
Brad King committed
126
vtk_test_cxx_executable(${vtk-module}CxxTests)
Ken Martin's avatar
Ken Martin committed
127

VTK Developers's avatar
VTK Developers committed
128
set(TEST_FBO_IMPLEMENTATION_EXE
129
  TestFBOImplementation)
VTK Developers's avatar
VTK Developers committed
130
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/TestFBOInclude.h.in
131
  ${CMAKE_CURRENT_BINARY_DIR}/TestFBOInclude.h
132
  @ONLY ESCAPE_QUOTES)
133
134
135
136

# This is used by TestFBO. Using a separate processes makes is possible to
# avoid issues to OpenGL implementations segfaulting etc. from affecting the
# test.
VTK Developers's avatar
VTK Developers committed
137
vtk_module_test_executable(TestFBOImplementation
138
  TestFBOImplementation.cxx)
139
target_link_libraries(TestFBOImplementation LINK_PRIVATE
VTK Developers's avatar
VTK Developers committed
140
  vtkRenderingOpenGL ${OPENGL_gl_LIBRARY})
141

VTK Developers's avatar
VTK Developers committed
142
if(VTK_OPENGL_HAS_OSMESA AND OSMESA_LIBRARY)
143
  target_link_libraries(TestFBOImplementation LINK_PRIVATE ${OSMESA_LIBRARY})
VTK Developers's avatar
VTK Developers committed
144
endif()
145

VTK Developers's avatar
VTK Developers committed
146
if(VTK_OPENGL_HAS_OSMESA AND OSMESA_LIBRARY)
147
  target_link_libraries(${vtk-module}CxxTests LINK_PRIVATE ${OSMESA_LIBRARY})
VTK Developers's avatar
VTK Developers committed
148
endif()
Ken Martin's avatar
Ken Martin committed
149
150

# Add other odd tests or executables
VTK Developers's avatar
VTK Developers committed
151
152
153
154
155
156
157
158
foreach(exe
  TimeRenderer
  TimeRenderer2
  VTKBenchMark
  )
  add_executable(${exe} ${exe}.cxx)
  target_link_libraries(${exe}
    vtkRenderingOpenGL
159
    vtkRenderingFreeTypeOpenGL
VTK Developers's avatar
VTK Developers committed
160
161
162
    vtkInteractionStyle
    vtkImagingSources
    vtkImagingGeneral
163
    vtkFiltersSources
VTK Developers's avatar
VTK Developers committed
164
165
166
167
168
169
170
171
172
    vtkIOCore
    ${OPENGL_gl_LIBRARY})
  if(APPLE)
    target_link_libraries(${exe} "-framework GLUT")
  endif()
  if(VTK_OPENGL_HAS_OSMESA AND OSMESA_LIBRARY)
    target_link_libraries(${exe} ${OSMESA_LIBRARY})
  endif()
endforeach()
173

174
175
176
177
178
if(VTK_USE_GLSL_SHADERS)
  set_tests_properties(
    ${vtk-module}Cxx-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()
179
180
181
182

set_tests_properties(${vtk-module}Cxx-TestOpacity
  PROPERTIES TIMEOUT 70)
set_tests_properties(${vtk-module}Cxx-TestTextureSize
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
183
  PROPERTIES TIMEOUT 300)