CMakeLists.txt 2.09 KB
Newer Older
1
2
3
4
5
# if we have rendering and views add the following tests
IF (VTK_USE_RENDERING AND VTK_USE_VIEWS)
  SET(KIT Charts)
  # add tests that do not require data
  SET(MyTests
6
    TestContextScene.cxx
7
    TestVector.cxx
8
    )
9

10
11
  IF (VTK_DATA_ROOT)
    # add tests that require data
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
    SET(MyTests ${MyTests}
      #    TestContextUnicode.cxx # Disabled until Freetype unicode works
      TestBarGraph.cxx
      TestContext.cxx
      TestDiagram.cxx
      TestLinePlot.cxx
      TestMarks.cxx
      TestMarksCallback.cxx
      TestMarksWedge.cxx
      TestMarksWedgeCallback.cxx
      TestMarksWedgeLine.cxx
      TestMultipleChartRenderers.cxx
      TestMultipleRenderers.cxx
      TestMultipleScalarsToColors.cxx
      TestParallelCoordinates.cxx
      TestPieChart.cxx
      TestScalarsToColors.cxx
      TestScatterPlot.cxx
      TestStackedBarGraph.cxx
      TestStackedPlot.cxx
      )
33
34
35
36
37
    IF(VTK_USE_GLSL_SHADERS)
      SET(MyTests ${MyTests}
        TestGLSL.cxx
        )
    ENDIF(VTK_USE_GLSL_SHADERS)
38
39
40
41
42
  ENDIF (VTK_DATA_ROOT)

  IF (VTK_USE_QT)
    #add tests that require Qt
    INCLUDE(${QT_USE_FILE})
43
44
45
46
47
48
49
    IF (VTK_DATA_ROOT)
      SET(MyTests ${MyTests}
        TestQtDiagram.cxx
        TestQtContextUnicode.cxx
        )
    ENDIF (VTK_DATA_ROOT)
  ENDIF(VTK_USE_QT)
50
51
52
53
54
55
56
57
58
59
60
  CREATE_TEST_SOURCELIST(Tests ${KIT}CxxTests.cxx ${MyTests}
    EXTRA_INCLUDE vtkTestDriver.h)
  ADD_EXECUTABLE(${KIT}CxxTests ${Tests})
  TARGET_LINK_LIBRARIES(${KIT}CxxTests vtkCharts)

  IF(VTK_USE_QT)
    TARGET_LINK_LIBRARIES(${KIT}CxxTests ${QT_LIBRARIES})
  ENDIF(VTK_USE_QT)

  SET (TestsToRun ${Tests})
  REMOVE (TestsToRun ${KIT}CxxTests.cxx)
61
62

  # Add all the executables
63
64
65
66
67
68
69
70
  FOREACH (test ${TestsToRun})
    GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
    IF (VTK_DATA_ROOT)
      ADD_TEST(Charts-${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)
71
      ADD_TEST(Charts-${TName} ${CXX_TEST_PATH}/${KIT}CxxTests ${TName})
72
    ENDIF (VTK_DATA_ROOT)
73
  ENDFOREACH (test)
74
ENDIF (VTK_USE_RENDERING AND VTK_USE_VIEWS)