forked from CExA-project/ddc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
209 lines (195 loc) · 10.1 KB
/
CMakeLists.txt
File metadata and controls
209 lines (195 loc) · 10.1 KB
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# Copyright (C) The DDC development team, see COPYRIGHT.md file
#
# SPDX-License-Identifier: MIT
cmake_minimum_required(VERSION 3.25)
include(GoogleTest)
set(DDC_SPLINES_TEST_DEGREE_MIN 3 CACHE STRING "Minimum degree to test splines.")
set(DDC_SPLINES_TEST_DEGREE_MAX 3 CACHE STRING "Maximum degree to test splines.")
add_executable(
splines_tests
../main.cpp
bsplines.cpp
knots_as_interpolation_points.cpp
splines_linear_problem.cpp
spline_builder.cpp
spline_traits.cpp
view.cpp
)
target_compile_features(splines_tests PUBLIC cxx_std_17)
target_link_libraries(splines_tests PUBLIC DDC::core DDC::splines GTest::gtest)
gtest_discover_tests(splines_tests DISCOVERY_MODE PRE_TEST)
foreach(DEGREE_X RANGE "${DDC_SPLINES_TEST_DEGREE_MIN}" "${DDC_SPLINES_TEST_DEGREE_MAX}")
foreach(BSPLINES_TYPE "BSPLINES_TYPE_UNIFORM" "BSPLINES_TYPE_NON_UNIFORM")
set(test_name "splines_tests_DEGREE_X_${DEGREE_X}_${BSPLINES_TYPE}")
add_executable("${test_name}" ../main.cpp periodic_spline_builder.cpp)
target_compile_definitions("${test_name}" PUBLIC -DDEGREE_X=${DEGREE_X} -D${BSPLINES_TYPE})
target_compile_features("${test_name}" PUBLIC cxx_std_17)
target_link_libraries("${test_name}" PUBLIC DDC::core DDC::splines GTest::gtest)
gtest_discover_tests("${test_name}" DISCOVERY_MODE PRE_TEST)
endforeach()
endforeach()
foreach(BCL "BCL_GREVILLE" "BCL_HERMITE")
foreach(BCR "BCR_GREVILLE" "BCR_HERMITE")
foreach(EVALUATOR "EVALUATOR_COSINE" "EVALUATOR_POLYNOMIAL")
foreach(
DEGREE_X
RANGE "${DDC_SPLINES_TEST_DEGREE_MIN}" "${DDC_SPLINES_TEST_DEGREE_MAX}"
)
foreach(BSPLINES_TYPE "BSPLINES_TYPE_UNIFORM" "BSPLINES_TYPE_NON_UNIFORM")
set(test_name
"splines_tests_DEGREE_X_${DEGREE_X}_${BSPLINES_TYPE}_${EVALUATOR}_${BCL}_${BCR}"
)
add_executable("${test_name}" ../main.cpp non_periodic_spline_builder.cpp)
target_compile_definitions(
"${test_name}"
PUBLIC
-DDEGREE_X=${DEGREE_X}
-D${BSPLINES_TYPE}
-D${EVALUATOR}
-D${BCL}
-D${BCR}
)
target_compile_features("${test_name}" PUBLIC cxx_std_17)
target_link_libraries("${test_name}" PUBLIC DDC::core DDC::splines GTest::gtest)
gtest_discover_tests("${test_name}" DISCOVERY_MODE PRE_TEST)
endforeach()
endforeach()
endforeach()
endforeach()
endforeach()
foreach(BC "BC_PERIODIC" "BC_GREVILLE")
foreach(DEGREE_X RANGE "${DDC_SPLINES_TEST_DEGREE_MIN}" "${DDC_SPLINES_TEST_DEGREE_MAX}")
foreach(BSPLINES_TYPE "BSPLINES_TYPE_UNIFORM" "BSPLINES_TYPE_NON_UNIFORM")
foreach(ER "ER_NULL" "ER_CONSTANT")
set(test_name
"splines_tests_DEGREE_X_${DEGREE_X}_${BSPLINES_TYPE}_${EVALUATOR}_${BC}_${ER}"
)
add_executable("${test_name}" ../main.cpp extrapolation_rule.cpp)
target_compile_definitions(
"${test_name}"
PUBLIC -DDEGREE=${DEGREE_X} -D${BSPLINES_TYPE} -D${EVALUATOR} -D${BC} -D${ER}
)
target_compile_features("${test_name}" PUBLIC cxx_std_17)
target_link_libraries("${test_name}" PUBLIC DDC::core DDC::splines GTest::gtest)
gtest_discover_tests("${test_name}" DISCOVERY_MODE PRE_TEST)
endforeach()
endforeach()
endforeach()
endforeach()
foreach(SOLVER "GINKGO" "LAPACK")
foreach(BC "BC_PERIODIC" "BC_GREVILLE" "BC_HERMITE")
foreach(DEGREE_X RANGE "${DDC_SPLINES_TEST_DEGREE_MIN}" "${DDC_SPLINES_TEST_DEGREE_MAX}")
foreach(BSPLINES_TYPE "BSPLINES_TYPE_UNIFORM" "BSPLINES_TYPE_NON_UNIFORM")
set(test_name
"splines_tests_BATCHED_DEGREE_X_${DEGREE_X}_${BSPLINES_TYPE}_${BC}_${SOLVER}"
)
add_executable("${test_name}" ../main.cpp batched_spline_builder.cpp)
target_compile_definitions(
"${test_name}"
PUBLIC -DDEGREE_X=${DEGREE_X} -D${BSPLINES_TYPE} -D${BC} -DSOLVER_${SOLVER}
)
target_compile_features("${test_name}" PUBLIC cxx_std_17)
target_link_libraries("${test_name}" PUBLIC DDC::core DDC::splines GTest::gtest)
gtest_discover_tests("${test_name}" DISCOVERY_MODE PRE_TEST)
endforeach()
endforeach()
endforeach()
endforeach()
foreach(DEGREE_X RANGE "${DDC_SPLINES_TEST_DEGREE_MIN}" "${DDC_SPLINES_TEST_DEGREE_MAX}")
set(test_name "splines_ordered_points_DEGREE_X_${DEGREE_X}")
add_executable("${test_name}" ../main.cpp periodic_spline_builder_ordered_points.cpp)
target_compile_definitions("${test_name}" PUBLIC -DDEGREE_X=${DEGREE_X})
target_compile_features("${test_name}" PUBLIC cxx_std_17)
target_link_libraries("${test_name}" PUBLIC DDC::core DDC::splines GTest::gtest)
gtest_discover_tests("${test_name}" DISCOVERY_MODE PRE_TEST)
endforeach()
foreach(DEGREE_X RANGE "${DDC_SPLINES_TEST_DEGREE_MIN}" "${DDC_SPLINES_TEST_DEGREE_MAX}")
foreach(BSPLINES_TYPE "BSPLINES_TYPE_UNIFORM" "BSPLINES_TYPE_NON_UNIFORM")
set(test_name "splines_tests_PERIODICITY_DEGREE_X_${DEGREE_X}_${BSPLINES_TYPE}")
add_executable("${test_name}" ../main.cpp periodicity_spline_builder.cpp)
target_compile_definitions("${test_name}" PUBLIC -DDEGREE_X=${DEGREE_X} -D${BSPLINES_TYPE})
target_compile_features("${test_name}" PUBLIC cxx_std_17)
target_link_libraries("${test_name}" PUBLIC DDC::core DDC::splines GTest::gtest)
gtest_discover_tests("${test_name}" DISCOVERY_MODE PRE_TEST)
endforeach()
endforeach()
foreach(BC "BC_PERIODIC" "BC_GREVILLE" "BC_HERMITE")
foreach(EVALUATOR "EVALUATOR_POLYNOMIAL")
foreach(DEGREE RANGE "${DDC_SPLINES_TEST_DEGREE_MIN}" "${DDC_SPLINES_TEST_DEGREE_MAX}")
foreach(BSPLINES_TYPE "BSPLINES_TYPE_UNIFORM" "BSPLINES_TYPE_NON_UNIFORM")
set(test_name
"2d_splines_tests_BATCHED_DEGREE_${DEGREE}_${BSPLINES_TYPE}_${EVALUATOR}_${BC}"
)
add_executable("${test_name}" ../main.cpp batched_2d_spline_builder.cpp)
target_compile_definitions(
"${test_name}"
PUBLIC -DDEGREE=${DEGREE} -D${BSPLINES_TYPE} -D${EVALUATOR} -D${BC}
)
target_compile_features("${test_name}" PUBLIC cxx_std_17)
target_link_libraries("${test_name}" PUBLIC DDC::core DDC::splines GTest::gtest)
gtest_discover_tests("${test_name}" DISCOVERY_MODE PRE_TEST)
endforeach()
endforeach()
endforeach()
endforeach()
foreach(BC "BC_PERIODIC" "BC_GREVILLE") # "BC_HERMITE")
foreach(EVALUATOR "EVALUATOR_POLYNOMIAL")
foreach(DEGREE RANGE "${DDC_SPLINES_TEST_DEGREE_MIN}" "${DDC_SPLINES_TEST_DEGREE_MAX}")
foreach(BSPLINES_TYPE "BSPLINES_TYPE_UNIFORM" "BSPLINES_TYPE_NON_UNIFORM")
set(test_name
"3d_splines_tests_BATCHED_DEGREE_${DEGREE}_${BSPLINES_TYPE}_${EVALUATOR}_${BC}"
)
add_executable("${test_name}" ../main.cpp batched_3d_spline_builder.cpp)
target_compile_definitions(
"${test_name}"
PUBLIC -DDEGREE=${DEGREE} -D${BSPLINES_TYPE} -D${EVALUATOR} -D${BC}
)
target_compile_features("${test_name}" PUBLIC cxx_std_17)
target_link_libraries("${test_name}" PUBLIC DDC::core DDC::splines GTest::gtest)
gtest_discover_tests("${test_name}" DISCOVERY_MODE PRE_TEST)
endforeach()
endforeach()
endforeach()
endforeach()
foreach(SOLVER "GINKGO" "LAPACK")
foreach(BC "BC_PERIODIC" "BC_GREVILLE" "BC_HERMITE")
foreach(DEGREE_X RANGE "${DDC_SPLINES_TEST_DEGREE_MIN}" "${DDC_SPLINES_TEST_DEGREE_MAX}")
foreach(BSPLINES_TYPE "BSPLINES_TYPE_UNIFORM" "BSPLINES_TYPE_NON_UNIFORM")
set(test_name
"splines_tests_BATCHED_MULTIPLE_DOMAINS_DEGREE_X_${DEGREE_X}_${BSPLINES_TYPE}_${BC}_${SOLVER}"
)
add_executable("${test_name}" ../main.cpp multiple_batch_domain_spline_builder.cpp)
target_compile_definitions(
"${test_name}"
PUBLIC -DDEGREE_X=${DEGREE_X} -D${BSPLINES_TYPE} -D${BC} -DSOLVER_${SOLVER}
)
target_compile_features("${test_name}" PUBLIC cxx_std_17)
target_link_libraries("${test_name}" PUBLIC DDC::core DDC::splines GTest::gtest)
gtest_discover_tests("${test_name}" DISCOVERY_MODE PRE_TEST)
endforeach()
endforeach()
endforeach()
endforeach()
foreach(BC "BC_PERIODIC" "BC_GREVILLE" "BC_HERMITE")
foreach(EVALUATOR "EVALUATOR_POLYNOMIAL")
foreach(DEGREE RANGE "${DDC_SPLINES_TEST_DEGREE_MIN}" "${DDC_SPLINES_TEST_DEGREE_MAX}")
foreach(BSPLINES_TYPE "BSPLINES_TYPE_UNIFORM" "BSPLINES_TYPE_NON_UNIFORM")
set(test_name
"2d_splines_tests_BATCHED_MULTIPLE_DOMAINS_DEGREE_${DEGREE}_${BSPLINES_TYPE}_${EVALUATOR}_${BC}"
)
add_executable(
"${test_name}"
../main.cpp
multiple_batch_domain_2d_spline_builder.cpp
)
target_compile_definitions(
"${test_name}"
PUBLIC -DDEGREE=${DEGREE} -D${BSPLINES_TYPE} -D${EVALUATOR} -D${BC}
)
target_compile_features("${test_name}" PUBLIC cxx_std_17)
target_link_libraries("${test_name}" PUBLIC DDC::core DDC::splines GTest::gtest)
gtest_discover_tests("${test_name}" DISCOVERY_MODE PRE_TEST)
endforeach()
endforeach()
endforeach()
endforeach()