File: CMakeLists.txt

package info (click to toggle)
vtk 5.8.0-13
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 130,524 kB
  • sloc: cpp: 1,129,256; ansic: 708,203; tcl: 48,526; python: 20,875; xml: 6,779; yacc: 4,208; perl: 3,121; java: 2,788; lex: 931; sh: 660; asm: 471; makefile: 299
file content (123 lines) | stat: -rw-r--r-- 3,778 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
SET(KIT Common)
CREATE_TEST_SOURCELIST(Tests ${KIT}CxxTests.cxx
  TestObjectFactory.cxx
  otherArrays.cxx
  otherTimerLog.cxx
  otherLookupTable.cxx
  otherLookupTableWithEnabling.cxx
  otherByteSwap.cxx
  otherStringArray.cxx
  TestAmoebaMinimizer.cxx
  TestArrayLookup.cxx
  TestConditionVariable.cxx
  TestGarbageCollector.cxx
  TestDataArray.cxx
  TestDataArrayComponentNames.cxx
  TestDirectory.cxx
  TestFastNumericConversion.cxx
  TestMath.cxx
  TestMatrix3x3.cxx
  TestMinimalStandardRandomSequence.cxx
  TestNew.cxx
  TestObservers.cxx
  TestPolynomialSolversUnivariate.cxx
  TestSmartPointer.cxx
  TestSortDataArray.cxx
  TestUnicodeStringAPI.cxx
  TestUnicodeStringArrayAPI.cxx
  TestVariantComparison.cxx
  TestWeakPointer.cxx
  TestSystemInformation.cxx
  EXTRA_INCLUDE vtkTestDriver.h
)

ADD_EXECUTABLE(${KIT}CxxTests ${Tests} vtkTestNewVar.cxx)
TARGET_LINK_LIBRARIES(${KIT}CxxTests vtkCommon)

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

# Configure a header needed by SystemInformation.
CONFIGURE_FILE("${VTK_SOURCE_DIR}/Common/Testing/Cxx/SystemInformation.h.in"
               "${VTK_BINARY_DIR}/Common/Testing/Cxx/SystemInformation.h"
               @ONLY IMMEDIATE)

#
# Add all the executables
FOREACH (test ${TestsToRun})
  GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
  ADD_TEST(${TName} ${CXX_TEST_PATH}/${KIT}CxxTests ${TName})
ENDFOREACH (test)

#
# Add the TestCxxFeatures test by itself so that if it doesn't compile
# we don't loose all the tests for common
#
ADD_EXECUTABLE(TestCxxFeatures TestCxxFeatures.cxx)
TARGET_LINK_LIBRARIES(TestCxxFeatures vtkCommon)
ADD_TEST(TestCxxFeatures ${CXX_TEST_PATH}/TestCxxFeatures)

#
# Add the TestInstantiator test by itself because it is designed to
# test pulling in all class's symbols.  We don't want the other tests
# to draw in symbols.
#
ADD_EXECUTABLE(TestInstantiator TestInstantiator.cxx)
TARGET_LINK_LIBRARIES(TestInstantiator vtkCommon)
ADD_TEST(TestInstantiator ${CXX_TEST_PATH}/TestInstantiator)

#
# Add a test that spits out the cygwin installation info if building
# with cygwin:
#
IF(CYGWIN)
  EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy 
    ${CMAKE_CURRENT_SOURCE_DIR}/SystemInformation-cygcheck.sh
    ${CMAKE_CURRENT_BINARY_DIR}/SystemInformation-cygcheck.sh)
  EXECUTE_PROCESS(COMMAND dos2unix 
    ${CMAKE_CURRENT_BINARY_DIR}/SystemInformation-cygcheck.sh)
  ADD_TEST(SystemInformation-cygcheck
    "${CMAKE_CURRENT_BINARY_DIR}/SystemInformation-cygcheck.sh")
ENDIF(CYGWIN)

IF(VTK_USE_N_WAY_ARRAYS)

  CREATE_TEST_SOURCELIST(ArrayTests ArrayCxxTests.cxx
    TestArrayAPI.cxx
    TestArrayAPIConvenience.cxx
    TestArrayAPIDense.cxx
    TestArrayAPISparse.cxx
    TestArrayBool.cxx
    TestArrayInterpolationDense.cxx
    TestArrayNullValues.cxx
    TestArrayExtents.cxx
    TestArrayUserTypes.cxx
    TestArrayVariants.cxx
    TestArraySize.cxx
    TestSparseArrayValidation.cxx
    EXTRA_INCLUDE vtkTestDriver.h
    )

  ADD_EXECUTABLE(ArrayCxxTests ${ArrayTests})
  TARGET_LINK_LIBRARIES(ArrayCxxTests vtkCommon)

  SET(ArrayTestsToRun ${ArrayTests})
  REMOVE(ArrayTestsToRun ArrayCxxTests.cxx)

  FOREACH(test ${ArrayTestsToRun})
    GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
    ADD_TEST(Array-${TName} ${CXX_TEST_PATH}/ArrayCxxTests ${TName})
  ENDFOREACH(test)

  IF(VTK_USE_BOOST)
    INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
    ADD_EXECUTABLE(TestArrayCasting TestArrayCasting.cxx)
    TARGET_LINK_LIBRARIES(TestArrayCasting vtkCommon)
    ADD_TEST(Array-TestArrayCasting ${CXX_TEST_PATH}/TestArrayCasting)
  ENDIF()

ENDIF(VTK_USE_N_WAY_ARRAYS)

# TestConditionVariable will attempt to allocate a thread for each available core
# and thus should not be run in parallel.
set_tests_properties(TestConditionVariable PROPERTIES RUN_SERIAL ON)