CMakeLists.txt 4.22 KB
Newer Older
Ken Martin's avatar
Ken Martin committed
1
SET(KIT IO)
2
3

SET(ConditionalTests)
4
IF(WIN32 AND VTK_USE_VIDEO_FOR_WINDOWS)
5
  SET(ConditionalTests ${ConditionalTests} TestAVIWriter.cxx)
6
ENDIF(WIN32 AND VTK_USE_VIDEO_FOR_WINDOWS)
7
IF(VTK_USE_MPEG2_ENCODER)
8
  SET(ConditionalTests ${ConditionalTests} TestMovieWriter.cxx)
9
ENDIF(VTK_USE_MPEG2_ENCODER)
10
11
12
IF(VTK_USE_FFMPEG_ENCODER)
  SET(ConditionalTests ${ConditionalTests} TestFFMPEGWriter.cxx)
ENDIF(VTK_USE_FFMPEG_ENCODER)
13
IF(VTK_USE_DISPLAY AND VTK_USE_RENDERING)
14
  SET(ConditionalTests ${ConditionalTests} TestHyperOctreeIO.cxx TestPLYReader.cxx)
15
ENDIF(VTK_USE_DISPLAY AND VTK_USE_RENDERING)
16
17
18
IF(VTK_USE_INFOVIS)
  SET(ConditionalTests ${ConditionalTests} TestDataObjectIO.cxx)
ENDIF(VTK_USE_INFOVIS)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
19
20
21
IF(VTK_USE_METAIO)
  SET(ConditionalTests ${ConditionalTests} TestMetaIO.cxx)
ENDIF(VTK_USE_METAIO)
22
23
24
25
26
27
28
IF(VTK_USE_POSTGRES AND VTK_PSQL_TEST_URL)
  SET(ConditionalTests ${ConditionalTests} TestPostgreSQLDatabase.cxx)
ENDIF(VTK_USE_POSTGRES AND VTK_PSQL_TEST_URL)
IF(VTK_USE_MYSQL AND VTK_MYSQL_TEST_URL)
  INCLUDE_DIRECTORIES( ${MYSQL_INCLUDE_DIRECTORIES} )
  SET(ConditionalTests ${ConditionalTests} TestMySQLDatabase.cxx)
ENDIF(VTK_USE_MYSQL AND VTK_MYSQL_TEST_URL)
29
SET(VTK_HAS_UINT64_ARRAY 0)
Alexander Neundorf's avatar
   
Alexander Neundorf committed
30

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
IF(VTK_SIZEOF_LONG_LONG MATCHES "^8$")
  SET(VTK_HAS_UINT64_ARRAY 1)
ELSE(VTK_SIZEOF_LONG_LONG MATCHES "^8$")
  IF(VTK_SIZEOF_LONG MATCHES "^8$")
    SET(VTK_HAS_UINT64_ARRAY 1)
  ELSE(VTK_SIZEOF_LONG MATCHES "^8$")
    IF(VTK_SIZEOF___INT64 MATCHES "^8$")
      IF(VTK_TYPE_CONVERT_UI64_TO_DOUBLE)
        SET(VTK_HAS_UINT64_ARRAY 1)
      ENDIF(VTK_TYPE_CONVERT_UI64_TO_DOUBLE)
    ENDIF(VTK_SIZEOF___INT64 MATCHES "^8$")
  ENDIF(VTK_SIZEOF_LONG MATCHES "^8$")
ENDIF(VTK_SIZEOF_LONG_LONG MATCHES "^8$")
IF(VTK_HAS_UINT64_ARRAY)
  SET(ConditionalTests ${ConditionalTests} TestSQLiteDatabase.cxx)
ENDIF(VTK_HAS_UINT64_ARRAY)
47

Ken Martin's avatar
Ken Martin committed
48
49
CREATE_TEST_SOURCELIST(Tests ${KIT}CxxTests.cxx
  TestXML.cxx
Andy Cedilnik's avatar
Andy Cedilnik committed
50
  TestCompress.cxx
51
  TestSQLDatabaseSchema.cxx
52
  ${ConditionalTests}
53
  EXTRA_INCLUDE vtkTestDriver.h
Ken Martin's avatar
Ken Martin committed
54
)
55

Ken Martin's avatar
Ken Martin committed
56
ADD_EXECUTABLE(${KIT}CxxTests ${Tests})
57
TARGET_LINK_LIBRARIES(${KIT}CxxTests vtkIO vtkImaging vtksys)
Andy Cedilnik's avatar
Andy Cedilnik committed
58

59
60
61
IF(VTK_USE_INFOVIS)
  TARGET_LINK_LIBRARIES(${KIT}CxxTests vtkInfovis)
ENDIF(VTK_USE_INFOVIS)
62
63
64
65
IF (VTK_USE_DISPLAY AND VTK_USE_RENDERING)
  TARGET_LINK_LIBRARIES(${KIT}CxxTests vtkRendering)
ENDIF (VTK_USE_DISPLAY AND VTK_USE_RENDERING)

Ken Martin's avatar
Ken Martin committed
66
IF (VTK_DATA_ROOT)
67
68
  ADD_TEST(TestXML ${CXX_TEST_PATH}/${KIT}CxxTests TestXML
    ${VTK_DATA_ROOT}/Data/sample.xml)
69
70
  ADD_TEST(TestMetaIO ${CXX_TEST_PATH}/${KIT}CxxTests TestMetaIO
    ${VTK_DATA_ROOT}/Data/HeadMRVolume.mhd)
71
72
  ADD_TEST(TestCompress ${CXX_TEST_PATH}/${KIT}CxxTests TestCompress
    ${VTK_DATA_ROOT}/Data/sample.xml)
73
  IF (VTK_USE_DISPLAY AND VTK_USE_RENDERING)
74
75
    ADD_TEST(TestHyperOctreeIO ${CXX_TEST_PATH}/${KIT}CxxTests
         TestHyperOctreeIO -D ${VTK_DATA_ROOT}
76
77
         -T ${VTK_BINARY_DIR}/Testing/Temporary
         -V ${VTK_DATA_ROOT}/Baseline/${KIT}/TestHyperOctreeIO.png)
78
79
80
81
    ADD_TEST(TestPLYReader ${CXX_TEST_PATH}/${KIT}CxxTests
         TestPLYReader -D ${VTK_DATA_ROOT}
         -T ${VTK_BINARY_DIR}/Testing/Temporary
         -V ${VTK_DATA_ROOT}/Baseline/${KIT}/TestPLYReader.png)
82
  ENDIF (VTK_USE_DISPLAY AND VTK_USE_RENDERING)
Ken Martin's avatar
Ken Martin committed
83
ENDIF (VTK_DATA_ROOT)
84

85
86
ADD_TEST(TestSQLDatabaseSchema ${CXX_TEST_PATH}/${KIT}CxxTests TestSQLDatabaseSchema)

87
IF(WIN32 AND VTK_USE_VIDEO_FOR_WINDOWS)
88
  ADD_TEST(TestAVIWriter ${CXX_TEST_PATH}/${KIT}CxxTests TestAVIWriter)
89
ENDIF(WIN32 AND VTK_USE_VIDEO_FOR_WINDOWS)
90
IF(VTK_USE_MPEG2_ENCODER)
91
  ADD_TEST(TestMovieWriter ${CXX_TEST_PATH}/${KIT}CxxTests TestMovieWriter)
92
ENDIF(VTK_USE_MPEG2_ENCODER)
93
94
95
IF(VTK_USE_FFMPEG_ENCODER)
  ADD_TEST(TestFFMPEGWriter ${CXX_TEST_PATH}/${KIT}CxxTests TestFFMPEGWriter)
ENDIF(VTK_USE_FFMPEG_ENCODER)
96
97
98
IF(VTK_HAS_UINT64_ARRAY)
  ADD_TEST(TestSQLiteDatabase ${CXX_TEST_PATH}/${KIT}CxxTests TestSQLiteDatabase)
ENDIF(VTK_HAS_UINT64_ARRAY)
99
100
101
IF(VTK_USE_POSTGRES AND VTK_PSQL_TEST_URL)
  ADD_TEST(TestPostgreSQLDatabase ${CXX_TEST_PATH}/${KIT}CxxTests TestPostgreSQLDatabase)
ENDIF(VTK_USE_POSTGRES AND VTK_PSQL_TEST_URL)
Timothy M. Shead's avatar
Timothy M. Shead committed
102
103
104
IF(VTK_USE_MYSQL AND VTK_MYSQL_TEST_URL)
  ADD_TEST(TestMySQLDatabase ${CXX_TEST_PATH}/${KIT}CxxTests TestMySQLDatabase)
ENDIF(VTK_USE_MYSQL AND VTK_MYSQL_TEST_URL)
105

106
107
108
IF(VTK_USE_INFOVIS)
  ADD_TEST(TestDataObjectIO ${CXX_TEST_PATH}/${KIT}CxxTests TestDataObjectIO)
ENDIF(VTK_USE_INFOVIS)