CMakeLists.txt 4.04 KB
Newer Older
1
# set(DUNE_MAX_TEST_CORES 4)
2
set_property(DIRECTORY PROPERTY RULE_LAUNCH_COMPILE "${CMAKE_COMMAND} -E time")
3

Praetorius, Simon's avatar
Praetorius, Simon committed
4
5
6
# additional compiler option for CMAKE_BUILD_TYPE=RelWithDebInfo only for gcc
set(NoVarTrackingAssignments $<$<AND:$<CONFIG:RelWithDebInfo>,$<CXX_COMPILER_ID:GNU>>:-fno-var-tracking-assignments>)

Müller, Felix's avatar
Müller, Felix committed
7
8
9
dune_add_test(SOURCES AdaptInfoTest.cpp
  LINK_LIBRARIES amdis)

Praetorius, Simon's avatar
Praetorius, Simon committed
10
11
12
dune_add_test(SOURCES AdaptiveGridTest.cpp
  LINK_LIBRARIES amdis)

13
foreach(_GRID RANGE 7)
14
15
16
17
18
19
  dune_add_test(NAME "BackupRestoreTest_${_GRID}"
    SOURCES BackupRestoreTest.cpp
    COMPILE_DEFINITIONS "GRID_ID=${_GRID}"
    LABELS "BackupRestore"
    LINK_LIBRARIES amdis)
  add_dune_alberta_flags(GRIDDIM 2 WORLDDIM 2 "BackupRestoreTest_${_GRID}")
Praetorius, Simon's avatar
Praetorius, Simon committed
20
21
  target_compile_options(BackupRestoreTest_${_GRID} PRIVATE
  ${NoVarTrackingAssignments})
22
23
endforeach()
unset(_GRID)
24

25
26
27
dune_add_test(SOURCES ConceptsTest.cpp
  LINK_LIBRARIES amdis)

28
29
30
31
32
33
dune_add_test(SOURCES DataTransferTest2d.cpp
  LINK_LIBRARIES amdis)

dune_add_test(SOURCES DataTransferTest3d.cpp
  LINK_LIBRARIES amdis)

34
35
36
37
38
39
dune_add_test(SOURCES DOFMappingTest.cpp
  LINK_LIBRARIES amdis
  MPI_RANKS 2
  TIMEOUT 300
  CMAKE_GUARD MPI_FOUND)

Praetorius, Simon's avatar
Praetorius, Simon committed
40
41
42
dune_add_test(SOURCES DOFVectorTest.cpp
  LINK_LIBRARIES amdis)

43
dune_add_test(SOURCES DiscreteFunctionTest.cpp
44
  LINK_LIBRARIES amdis)
45

46
dune_add_test(SOURCES ExpressionsTest.cpp
47
  LINK_LIBRARIES amdis)
48

49
50
51
dune_add_test(SOURCES FakeContainerTest.cpp
  LINK_LIBRARIES amdis)

52
53
54
dune_add_test(SOURCES FieldMatVecTest.cpp
  LINK_LIBRARIES amdis)

55
56
57
dune_add_test(SOURCES FiniteElementTypeTest.cpp
  LINK_LIBRARIES amdis)

58
59
60
dune_add_test(SOURCES FilesystemTest.cpp
  LINK_LIBRARIES amdis)

61
62
63
dune_add_test(SOURCES FlatMatVecTest.cpp
  LINK_LIBRARIES amdis)

64
65
66
dune_add_test(SOURCES FlatPreBasisTest.cpp
  LINK_LIBRARIES amdis)

67
68
69
70
71
72
dune_add_test(SOURCES GlobalIdSetTest.cpp
  LINK_LIBRARIES amdis
  MPI_RANKS 2
  TIMEOUT 300
  CMAKE_GUARD MPI_FOUND)

73
74
75
dune_add_test(SOURCES GradientTest.cpp
  LINK_LIBRARIES amdis)

76
77
78
79
80
81
82
if(BACKEND STREQUAL "ISTL")
  dune_add_test(SOURCES ISTLCommTest.cpp
    LINK_LIBRARIES amdis
    MPI_RANKS 2 4
    TIMEOUT 300
    CMAKE_GUARD MPI_FOUND)
endif()
83

Praetorius, Simon's avatar
Praetorius, Simon committed
84
dune_add_test(SOURCES IntegrateTest.cpp
85
  LINK_LIBRARIES amdis)
Praetorius, Simon's avatar
Praetorius, Simon committed
86

Praetorius, Simon's avatar
Praetorius, Simon committed
87
dune_add_test(SOURCES MarkerTest.cpp
88
  LINK_LIBRARIES amdis)
Praetorius, Simon's avatar
Praetorius, Simon committed
89

90
91
92
93
94
95
dune_add_test(SOURCES MpiWrapperTest.cpp
  LINK_LIBRARIES amdis
  MPI_RANKS 2 4
  TIMEOUT 300
  CMAKE_GUARD "MPI_FOUND")

96
97
98
dune_add_test(SOURCES NodeIndicesTest.cpp
  LINK_LIBRARIES amdis)

99
100
101
dune_add_test(SOURCES ObserverTest.cpp
  LINK_LIBRARIES amdis)

102
103
104
dune_add_test(SOURCES OperationsTest.cpp
  LINK_LIBRARIES amdis)

105
106
107
dune_add_test(SOURCES OperatorsTest.cpp
  LINK_LIBRARIES amdis)

108
if(BACKEND STREQUAL "PETSC" OR BACKEND STREQUAL "ISTL")
109
110
111
112
113
114
115
116
117
foreach(_GRID RANGE 6)
  dune_add_test(NAME "ParallelIndexSetTest_${_GRID}"
    SOURCES ParallelIndexSetTest.cpp
    COMPILE_DEFINITIONS "GRID_ID=${_GRID}"
    LABELS "ParallelIndexSetTest"
    LINK_LIBRARIES amdis
    MPI_RANKS 2 3 4
    TIMEOUT 300
    CMAKE_GUARD MPI_FOUND)
Praetorius, Simon's avatar
Praetorius, Simon committed
118
119
  target_compile_options(ParallelIndexSetTest_${_GRID} PRIVATE
    ${NoVarTrackingAssignments})
120
121
122
123
endforeach()
unset(_GRID)
endif()

124
125
126
127
128
129
130
131
132
133
134
135
136
137
if(BACKEND STREQUAL "PETSC")
foreach(_GRID RANGE 6)
  dune_add_test(NAME "PETScCommTest_${_GRID}"
    SOURCES PETScCommTest.cpp
    COMPILE_DEFINITIONS "GRID_ID=${_GRID}"
    LABELS "PETScCommTest"
    LINK_LIBRARIES amdis
    MPI_RANKS 2 3 4
    TIMEOUT 300
    CMAKE_GUARD MPI_FOUND)
endforeach()
unset(_GRID)
endif()

138
139
140
dune_add_test(SOURCES ProblemStatTest.cpp
  LINK_LIBRARIES amdis)

141
142
143
dune_add_test(SOURCES RangeTypeTest.cpp
  LINK_LIBRARIES amdis)

144
145
146
dune_add_test(SOURCES RecursiveTest.cpp
  LINK_LIBRARIES amdis)

Praetorius, Simon's avatar
Praetorius, Simon committed
147
dune_add_test(SOURCES StaticSizeTest.cpp
Praetorius, Simon's avatar
Praetorius, Simon committed
148
149
  LINK_LIBRARIES amdis)

150
151
dune_add_test(SOURCES StringTest.cpp
  LINK_LIBRARIES amdis)
152

Praetorius, Simon's avatar
Praetorius, Simon committed
153
154
155
dune_add_test(SOURCES SwitchCasesTest.cpp
  LINK_LIBRARIES amdis)

156
157
dune_add_test(SOURCES TreeContainerTest.cpp
  LINK_LIBRARIES amdis)
158

159
160
161
dune_add_test(SOURCES TreePathTest.cpp
  LINK_LIBRARIES amdis)

162
dune_add_test(SOURCES UniqueBorderPartitionTest.cpp
163
164
165
166
  LINK_LIBRARIES amdis
  MPI_RANKS 2
  TIMEOUT 300
  CMAKE_GUARD MPI_FOUND)
167
168
169

dune_add_test(SOURCES ValidTreePathTest.cpp
  LINK_LIBRARIES amdis)