Repository navigation
Expand file tree
/
Copy pathCMakePresets.json
More file actions
291 lines (287 loc) · 13.1 KB
/
Copy pathCMakePresets.json
File metadata and controls
291 lines (287 loc) · 13.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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
{
"version": 6,
"configurePresets": [
{
"name": "base-vcpkg",
"hidden": true,
"generator": "Ninja",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
"name": "base-linux",
"hidden": true,
"generator": "Ninja",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
"name": "base-gnu-linux",
"hidden": true,
"inherits": "base-linux",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/gnu-toolchain.cmake"
}
},
{
"name": "base-clang-linux",
"hidden": true,
"inherits": "base-linux",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/llvm-toolchain.cmake"
}
},
{
"name": "base-clangcl",
"hidden": true,
"inherits": "base-vcpkg",
"cacheVariables": {
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/cmake/clang-cl-toolchain.cmake"
}
},
{
"name": "cl-debug",
"displayName": "Debug (MSVC)",
"inherits": "base-vcpkg",
"binaryDir": "${sourceDir}/build/cl-debug",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }
},
{
"name": "cl-release",
"displayName": "Release (MSVC)",
"inherits": "base-vcpkg",
"binaryDir": "${sourceDir}/build/cl-release",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
},
{
"name": "cl-qt-debug",
"displayName": "Debug + Qt WebSocket (MSVC, Windows)",
"inherits": "cl-debug",
"binaryDir": "${sourceDir}/build/cl-qt-debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"MORPH_BUILD_QT": "ON"
}
},
{
"name": "cl-qt-release",
"displayName": "Release + Qt WebSocket (MSVC, Windows)",
"inherits": "base-vcpkg",
"binaryDir": "${sourceDir}/build/cl-qt-release",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"MORPH_BUILD_QT": "ON",
"MORPH_BUILD_TESTS": "ON"
}
},
{
"name": "clangcl-debug",
"displayName": "Debug (clang-cl, Windows)",
"inherits": "base-clangcl",
"binaryDir": "${sourceDir}/build/clangcl-debug",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }
},
{
"name": "clangcl-release",
"displayName": "Release (clang-cl, Windows)",
"inherits": "base-clangcl",
"binaryDir": "${sourceDir}/build/clangcl-release",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
},
{
"name": "windows-everything",
"displayName": "Every optional feature (clang-cl release, Windows)",
"inherits": "clangcl-release",
"binaryDir": "${sourceDir}/build/windows-everything",
"cacheVariables": {
"MORPH_BUILD_TESTS": "ON",
"MORPH_BUILD_EXAMPLES": "ON",
"MORPH_BUILD_BANK_EXAMPLE": "ON",
"MORPH_BUILD_BANK_GUI": "ON",
"MORPH_BUILD_HMAC_EXAMPLES": "ON",
"MORPH_BUILD_HMAC_EXAMPLE_LIBSODIUM": "OFF",
"MORPH_BUILD_FORMS_QML": "ON",
"MORPH_BUILD_QT": "ON",
"MORPH_BUILD_LADDER": "ON",
"MORPH_LADDER_RUNGS": "all",
"MORPH_BUILD_FUZZERS": "ON",
"MORPH_BUILD_LOAD_TESTS": "ON",
"MORPH_BUILD_OFFLINE_SQLITE": "ON"
}
},
{
"name": "gcc-debug",
"displayName": "Debug (GCC, Linux)",
"inherits": "base-gnu-linux",
"binaryDir": "${sourceDir}/build/gcc-debug",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }
},
{
"name": "gcc-release",
"displayName": "Release (GCC, Linux)",
"inherits": "base-gnu-linux",
"binaryDir": "${sourceDir}/build/gcc-release",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
},
{
"name": "clang-debug",
"displayName": "Debug (Clang, Linux)",
"inherits": "base-clang-linux",
"binaryDir": "${sourceDir}/build/clang-debug",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }
},
{
"name": "clang-release",
"displayName": "Release (Clang, Linux)",
"inherits": "base-clang-linux",
"binaryDir": "${sourceDir}/build/clang-release",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
},
{
"name": "linux-everything",
"displayName": "Every optional feature (Clang release, Linux)",
"inherits": "clang-release",
"binaryDir": "${sourceDir}/build/linux-everything",
"cacheVariables": {
"MORPH_BUILD_TESTS": "ON",
"MORPH_BUILD_EXAMPLES": "ON",
"MORPH_BUILD_BANK_EXAMPLE": "ON",
"MORPH_BUILD_BANK_GUI": "ON",
"MORPH_BUILD_HMAC_EXAMPLES": "ON",
"MORPH_BUILD_FORMS_QML": "ON",
"MORPH_BUILD_QT": "ON",
"MORPH_BUILD_LADDER": "ON",
"MORPH_LADDER_RUNGS": "all",
"MORPH_BUILD_NET": "ON",
"MORPH_BUILD_FUZZERS": "ON",
"MORPH_BUILD_LOAD_TESTS": "ON",
"MORPH_BUILD_OFFLINE_SQLITE": "ON"
}
},
{
"name": "clang-asan",
"displayName": "ASan + UBSan (Clang, Linux)",
"inherits": "base-clang-linux",
"binaryDir": "${sourceDir}/build/clang-asan",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"AF_SANITIZER": "asan"
}
},
{
"name": "clang-tsan",
"displayName": "TSan (Clang, Linux)",
"inherits": "base-clang-linux",
"binaryDir": "${sourceDir}/build/clang-tsan",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"AF_SANITIZER": "tsan"
}
},
{
"name": "clang-ubsan",
"displayName": "UBSan standalone (Clang, Linux)",
"inherits": "base-clang-linux",
"binaryDir": "${sourceDir}/build/clang-ubsan",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"AF_SANITIZER": "ubsan"
}
},
{
"name": "clang-coverage",
"displayName": "Coverage (Clang source-based, Linux)",
"inherits": "base-clang-linux",
"binaryDir": "${sourceDir}/build/clang-coverage",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"AF_COVERAGE": "ON"
}
}
],
"buildPresets": [
{ "name": "cl-debug", "configurePreset": "cl-debug", "jobs": 0 },
{ "name": "cl-release", "configurePreset": "cl-release", "jobs": 0 },
{ "name": "cl-qt-debug", "configurePreset": "cl-qt-debug", "jobs": 0 },
{ "name": "cl-qt-release", "configurePreset": "cl-qt-release", "jobs": 0 },
{ "name": "clangcl-debug", "configurePreset": "clangcl-debug", "jobs": 0 },
{ "name": "clangcl-release", "configurePreset": "clangcl-release", "jobs": 0 },
{ "name": "windows-everything", "configurePreset": "windows-everything", "jobs": 0 },
{ "name": "gcc-debug", "configurePreset": "gcc-debug", "jobs": 0 },
{ "name": "gcc-release", "configurePreset": "gcc-release", "jobs": 0 },
{ "name": "clang-debug", "configurePreset": "clang-debug", "jobs": 0 },
{ "name": "clang-release", "configurePreset": "clang-release", "jobs": 0 },
{ "name": "linux-everything", "configurePreset": "linux-everything", "jobs": 0 },
{ "name": "clang-asan", "configurePreset": "clang-asan", "jobs": 0 },
{ "name": "clang-tsan", "configurePreset": "clang-tsan", "jobs": 0 },
{ "name": "clang-ubsan", "configurePreset": "clang-ubsan", "jobs": 0 },
{ "name": "clang-coverage", "configurePreset": "clang-coverage", "jobs": 0 }
],
"testPresets": [
{
"name": "base-test",
"hidden": true,
"description": "Shared test-run policy for every leg. Two things a reader needs. (1) stopOnFailure is deliberately NOT set here. A red CI leg has to name every test that failed, not whichever one ctest happened to reach first: stopping early makes one broken test and thirty broken tests look identical in the log, and a diagnosis made from that log is made on partial information (morph#616). ctest has no --no-stop-on-failure, so 'set it in the preset and override it in CI' is not available -- the preset is the only place the decision can be made. (2) A leg whose later tests are genuinely meaningless after an early failure may set stopOnFailure on its own preset, but must say why in its own description. Inheritance merges 'execution' key by key -- measured on CMake 4.4.3: a child preset that sets only stopOnFailure still gets noTestsAction from here -- so setting it back is a one-key change, not a copy of this whole block.",
"output": { "outputOnFailure": true },
"execution": { "noTestsAction": "error" }
},
{ "name": "cl-debug", "configurePreset": "cl-debug", "inherits": "base-test" },
{ "name": "cl-qt-debug", "configurePreset": "cl-qt-debug", "inherits": "base-test" },
{ "name": "cl-qt-release", "configurePreset": "cl-qt-release", "inherits": "base-test" },
{ "name": "clangcl-debug", "configurePreset": "clangcl-debug", "inherits": "base-test" },
{ "name": "windows-everything","configurePreset": "windows-everything","inherits": "base-test" },
{ "name": "gcc-debug", "configurePreset": "gcc-debug", "inherits": "base-test" },
{ "name": "clang-debug", "configurePreset": "clang-debug", "inherits": "base-test" },
{ "name": "linux-everything", "configurePreset": "linux-everything", "inherits": "base-test" },
{
"name": "clang-asan",
"configurePreset": "clang-asan",
"inherits": "base-test",
"description": "ASan+UBSan test run. Excludes the OomInjector tests here rather than leaving it to the caller: tests/oom_injector.cpp compiles its global operator new/delete overrides out whenever __SANITIZE_ADDRESS__ or __SANITIZE_THREAD__ is defined (the sanitizer runtimes define their own, and two definitions do not link), so under this preset every test that arms the injector throws 'OomInjector: unusable under ASan/TSan' and fails. Measured under clang-tsan on CMake 4.4.3: 5 OomInjector cases plus the morph#108 allocation-failure case fail that way with no exclusion. The name regex matches what .github/workflows/ci.yml passes as -E on this leg; CI still passes it explicitly, and a command-line -E simply overrides this field with the same value.",
"filter": { "exclude": { "name": "OomInjector|morph#108" } }
},
{
"name": "clang-tsan",
"configurePreset": "clang-tsan",
"inherits": "base-test",
"description": "TSan test run. Three things it sets that a caller would otherwise have to know. (1) TSAN_OPTIONS points at cmake/tsan.supp through ${sourceDir}, i.e. absolutely, so it resolves from any working directory and cannot drift from the file it names. A relative 'suppressions=cmake/tsan.supp' does not survive test discovery: catch_discover_tests runs the binary with the working directory set to its own build directory, TSan then fails to open the file and exits with its default exitcode=66, and Catch2's CatchAddTests.cmake reports 'Result: 66 / Output:' with nothing in it -- the listing goes to a file via --out, so that error block is empty for every discovery failure -- attributed to whichever binary ctest enumerated first (examples/concepts), which is nowhere near the cause. (2) The OomInjector exclusion, for the reason spelled out on the clang-asan preset above. (3) second_deadlock_stack=1, colon-separated into the same value -- a second TSAN_OPTIONS key would replace the first and drop the suppressions file, which is this preset's own morph#688 failure one spelling over. It is what makes a lock-order inversion name where each already-held mutex was taken (36 report lines -> 55 on a two-mutex inversion, the extra 19 being two 'Mutex Mn previously acquired by the same thread here:' stacks); CI's two TSan legs pass it, and a local reproduction that did not would be less informative than the CI run it is reproducing -- the asymmetry morph#688 existed to remove (morph#736).",
"environment": {
"TSAN_OPTIONS": "suppressions=${sourceDir}/cmake/tsan.supp:second_deadlock_stack=1"
},
"filter": { "exclude": { "name": "OomInjector|morph#108" } }
},
{ "name": "clang-ubsan", "configurePreset": "clang-ubsan", "inherits": "base-test" },
{ "name": "clang-coverage", "configurePreset": "clang-coverage", "inherits": "base-test" }
],
"workflowPresets": [
{
"name": "cl-debug",
"displayName": "Configure, build, and test (MSVC debug)",
"steps": [
{ "type": "configure", "name": "cl-debug" },
{ "type": "build", "name": "cl-debug" },
{ "type": "test", "name": "cl-debug" }
]
},
{
"name": "cl-release",
"displayName": "Configure and build (MSVC release)",
"steps": [
{ "type": "configure", "name": "cl-release" },
{ "type": "build", "name": "cl-release" }
]
},
{
"name": "clang-asan",
"displayName": "Configure, build, and test (Clang ASan)",
"steps": [
{ "type": "configure", "name": "clang-asan" },
{ "type": "build", "name": "clang-asan" },
{ "type": "test", "name": "clang-asan" }
]
}
]
}