CMakeLists.txt 5.24 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
4
  )

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

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

  if(WIN32 AND NOT VTK_USE_X)
    vtk_add_test_cxx(TestWin32OpenGLRenderWindow.cxx NO_VALID)
  endif()
86

VTK Developers's avatar
VTK Developers committed
87
endif()
88

89
90
include_directories(${OPENGL_INCLUDE_DIR})

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
vtk_add_test_cxx(
  TestAreaSelections.cxx
  TestGlyph3DMapperArrow.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
106
107
108
  RenderNonFinite.cxx
  SurfacePlusEdges.cxx
  TestLabelPlacementMapper.cxx
109
  )
Ken Martin's avatar
Ken Martin committed
110
111
112
113
114
115
if(NOT VTK_REPLACE_OPENGL_OVERRIDES)
  vtk_add_test_cxx(
  TestMultiblockDisplayProperties.cxx
  TestMultiTexturing.cxx
  TestMultiTexturingTransform.cxx)
endif()
VTK Developers's avatar
VTK Developers committed
116

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

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

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

# 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
138
vtk_module_test_executable(TestFBOImplementation
139
  TestFBOImplementation.cxx)
140
target_link_libraries(TestFBOImplementation LINK_PRIVATE
VTK Developers's avatar
VTK Developers committed
141
  vtkRenderingOpenGL ${OPENGL_gl_LIBRARY})
142

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

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

# Add other odd tests or executables
VTK Developers's avatar
VTK Developers committed
152
153
154
155
156
157
158
159
foreach(exe
  TimeRenderer
  TimeRenderer2
  VTKBenchMark
  )
  add_executable(${exe} ${exe}.cxx)
  target_link_libraries(${exe}
    vtkRenderingOpenGL
160
    vtkRenderingFreeTypeOpenGL
VTK Developers's avatar
VTK Developers committed
161
162
163
    vtkInteractionStyle
    vtkImagingSources
    vtkImagingGeneral
164
    vtkFiltersSources
VTK Developers's avatar
VTK Developers committed
165
166
167
168
169
170
171
172
173
    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()
174

175
176
177
178
179
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()
180
181
182
183

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