CMakeLists.txt 3.71 KB
Newer Older
1
# set(DUNE_MAX_TEST_CORES 4)
2

3
4
5
# 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
6
7
8
dune_add_test(SOURCES AdaptInfoTest.cpp
  LINK_LIBRARIES amdis)

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

12
foreach(_GRID RANGE 7)
13
14
15
16
17
18
  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}")
19
20
  target_compile_options(BackupRestoreTest_${_GRID} PRIVATE
    ${NoVarTrackingAssignments})
21
22
endforeach()
unset(_GRID)
23

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

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

dune_add_test(SOURCES DataTransferTest3d.cpp
  LINK_LIBRARIES amdis)

33
34
35
36
37
38
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
39
40
41
dune_add_test(SOURCES DOFVectorTest.cpp
  LINK_LIBRARIES amdis)

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

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

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

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

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

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

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

63
64
65
66
67
68
dune_add_test(SOURCES GlobalIdSetTest.cpp
  LINK_LIBRARIES amdis
  MPI_RANKS 2
  TIMEOUT 300
  CMAKE_GUARD MPI_FOUND)

69
70
71
dune_add_test(SOURCES GradientTest.cpp
  LINK_LIBRARIES amdis)

72
73
74
75
76
77
78
if(BACKEND STREQUAL "ISTL")
  dune_add_test(SOURCES ISTLCommTest.cpp
    LINK_LIBRARIES amdis
    MPI_RANKS 2 4
    TIMEOUT 300
    CMAKE_GUARD MPI_FOUND)
endif()
79

Praetorius, Simon's avatar
Praetorius, Simon committed
80
dune_add_test(SOURCES IntegrateTest.cpp
81
  LINK_LIBRARIES amdis)
Praetorius, Simon's avatar
Praetorius, Simon committed
82

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

86
87
88
89
90
91
dune_add_test(SOURCES MpiWrapperTest.cpp
  LINK_LIBRARIES amdis
  MPI_RANKS 2 4
  TIMEOUT 300
  CMAKE_GUARD "MPI_FOUND")

92
93
94
dune_add_test(SOURCES NodeIndicesTest.cpp
  LINK_LIBRARIES amdis)

95
96
97
dune_add_test(SOURCES ObserverTest.cpp
  LINK_LIBRARIES amdis)

98
99
100
dune_add_test(SOURCES OperationsTest.cpp
  LINK_LIBRARIES amdis)

101
102
103
dune_add_test(SOURCES OperatorsTest.cpp
  LINK_LIBRARIES amdis)

104
if(BACKEND STREQUAL "PETSC" OR BACKEND STREQUAL "ISTL")
105
106
107
108
109
110
111
112
113
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)
114
115
  target_compile_options(ParallelIndexSetTest_${_GRID} PRIVATE
    ${NoVarTrackingAssignments})
116
117
118
119
endforeach()
unset(_GRID)
endif()

120
121
122
123
124
125
126
127
128
129
130
131
132
133
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()

134
135
136
dune_add_test(SOURCES ProblemStatTest.cpp
  LINK_LIBRARIES amdis)

137
138
139
dune_add_test(SOURCES RangeTypeTest.cpp
  LINK_LIBRARIES amdis)

Praetorius, Simon's avatar
Praetorius, Simon committed
140
dune_add_test(SOURCES StaticSizeTest.cpp
Praetorius, Simon's avatar
Praetorius, Simon committed
141
142
  LINK_LIBRARIES amdis)

143
144
dune_add_test(SOURCES StringTest.cpp
  LINK_LIBRARIES amdis)
145

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

149
150
dune_add_test(SOURCES TreeContainerTest.cpp
  LINK_LIBRARIES amdis)
151

152
dune_add_test(SOURCES UniqueBorderPartitionTest.cpp
153
154
155
156
  LINK_LIBRARIES amdis
  MPI_RANKS 2
  TIMEOUT 300
  CMAKE_GUARD MPI_FOUND)