CMakeLists.txt 5 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
    TestGPUInfo.cxx
27
    TestGradientBackground.cxx
28
    TestInteractorTimers.cxx
29
    TestLabelPlacer.cxx
30
    TestLabelPlacer2D.cxx
31
    TestLabelPlacerCoincidentPoints.cxx
Jeff Baumes's avatar
Jeff Baumes committed
32
33
    TestLabelPlacementMapper2D.cxx
    TestLabelPlacementMapperCoincidentPoints.cxx
Francois Bertel's avatar
Francois Bertel committed
34
    TestLightActor.cxx
35
    TestLODActor.cxx
36
    TestManyActors.cxx
37
    TestOrderedTriangulator.cxx
38
    TestOpacity.cxx
Francois Bertel's avatar
Francois Bertel committed
39
    TestOSConeCxx.cxx
40
    TestPOVExporter.cxx
41
    TestResetCameraVerticalAspectRatio.cxx
42
    TestResetCameraVerticalAspectRatioParallel.cxx
43
    TestSobelGradientMagnitudePass.cxx
Francois Bertel's avatar
Francois Bertel committed
44
    TestShadowMapPass.cxx
45
46
    TestTextActorAlphaBlending.cxx
    TestTextActorDepthPeeling.cxx
47
48
    TestTextActor3DAlphaBlending.cxx
    TestTextActor3DDepthPeeling.cxx
49
    TestTDx.cxx
50
    TestTilingCxx.cxx
51
52
    TestTranslucentLUTAlphaBlending.cxx
    TestTranslucentLUTDepthPeeling.cxx
53
    TestTranslucentLUTDepthPeelingPass.cxx
54
    TestTranslucentLUTTextureAlphaBlending.cxx
55
    TestTranslucentLUTTextureDepthPeeling.cxx
56
    )
57

58
  IF(VTK_DATA_ROOT)
59
60
61
    SET(RenderingTestsWithArguments
      ${RenderingTestsWithArguments}
      TestAreaSelections.cxx
62
63
      TestMultiTexturing.cxx
      TestMultiTexturingTransform.cxx
64
      TestScenePicker.cxx
65
66
67
68
69
70
71
72
      TestTextureRGBA.cxx
      TestTextureRGBADepthPeeling.cxx
      TestTranslucentImageActorAlphaBlending.cxx
      TestTranslucentImageActorDepthPeeling.cxx
      TestTStripsColorsTCoords.cxx
      TestTStripsNormalsColorsTCoords.cxx
      TestTStripsNormalsTCoords.cxx
      TestTStripsTCoords.cxx
73
      )
74
  ENDIF(VTK_DATA_ROOT)
75

76
  IF(VTK_USE_DISPLAY AND VTK_DATA_ROOT)
77
78
  SET(RenderingTestsWithArguments
      ${RenderingTestsWithArguments}
79
80
      SurfacePlusEdges.cxx
      TestLabelPlacementMapper.cxx
81
      )
82
83
  ENDIF(VTK_USE_DISPLAY AND VTK_DATA_ROOT)

84
85
86
87
88
  IF (VTK_USE_GLSL_SHADERS)
    # Tests testing GLSL Shaders.
    SET(RenderingTestsWithArguments
      ${RenderingTestsWithArguments}
      TestGenericVertexAttributesGLSLCxx.cxx
89
90
      TestGenericVertexAttributesGLSLAlphaBlending.cxx
      TestGenericVertexAttributesGLSLDepthPeelingPass.cxx
91
      )
92
93
94
95
96
97
98
    # Temporarily disable LIC tests on non-windows platforms
    IF(WIN32) 
      IF (VTK_DATA_ROOT)
        SET( RenderingTestsWithArguments
        ${RenderingTestsWithArguments}
        TestSurfaceLIC.cxx
        )
Dave Partyka's avatar
Dave Partyka committed
99
      ENDIF (VTK_DATA_ROOT)
100
    ENDIF(WIN32)
101
102
  ENDIF (VTK_USE_GLSL_SHADERS)

103
104
105
ENDIF(VTK_USE_DISPLAY)

CREATE_TEST_SOURCELIST(Tests ${KIT}CxxTests.cxx
Ken Martin's avatar
Ken Martin committed
106
  ${RenderingTests};${RenderingTestsWithArguments}
107
  EXTRA_INCLUDE vtkTestDriver.h
108
  )
Ken Martin's avatar
Ken Martin committed
109

110
111
112
113
114
115
116
117
118
119
120
121
SET (TEST_FBO_IMPLEMENTATION_EXE
  TestFBOImplementation)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/TestFBOInclude.h.in 
  ${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
122
  vtkRendering ${OPENGL_gl_LIBRARY})
123

124
ADD_EXECUTABLE(${KIT}CxxTests ${Tests})
125
TARGET_LINK_LIBRARIES(${KIT}CxxTests vtkRendering vtkIO ${OPENGL_gl_LIBRARY})
126

Ken Martin's avatar
Ken Martin committed
127
128

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

Ken Martin's avatar
updates  
Ken Martin committed
131
#
Ken Martin's avatar
Ken Martin committed
132
# Add all the executables 
Ken Martin's avatar
Ken Martin committed
133
FOREACH (test ${RenderingTests})
Ken Martin's avatar
Ken Martin committed
134
  GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
135
136
137
  ADD_TEST(${TName} ${CXX_TEST_PATH}/${KIT}CxxTests ${TName}
    -T ${VTK_BINARY_DIR}/Testing/Temporary
    ) 
Ken Martin's avatar
Ken Martin committed
138
139
ENDFOREACH (test) 

Ken Martin's avatar
Ken Martin committed
140
141
142
143
144
145
146
147
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)
148
149
150
    ADD_TEST(${TName} ${CXX_TEST_PATH}/${KIT}CxxTests ${TName}
      -T ${VTK_BINARY_DIR}/Testing/Temporary
      )
Ken Martin's avatar
Ken Martin committed
151
152
153
  ENDIF (VTK_DATA_ROOT)
ENDFOREACH(test)

Ken Martin's avatar
Ken Martin committed
154
155
#
# Add other odd tests or executables
Ken Martin's avatar
updates  
Ken Martin committed
156
#
Brad King's avatar
Brad King committed
157
FOREACH (exe
158
159
    TimeRenderer
    TimeRenderer2
Francois Bertel's avatar
Francois Bertel committed
160
    VTKBenchMark
161
    )
Brad King's avatar
Brad King committed
162
  ADD_EXECUTABLE(${exe} ${exe}.cxx)
163
  TARGET_LINK_LIBRARIES(${exe} vtkRendering vtkIO ${OPENGL_gl_LIBRARY})
164
  IF (APPLE)
Andy Cedilnik's avatar
Andy Cedilnik committed
165
    TARGET_LINK_LIBRARIES(${exe} "-framework GLUT")
166
  ENDIF (APPLE)
Brad King's avatar
Brad King committed
167
ENDFOREACH (exe)
168
169
170
171

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)