-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathCMakePresets.json
More file actions
288 lines (288 loc) · 10.6 KB
/
CMakePresets.json
File metadata and controls
288 lines (288 loc) · 10.6 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
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"patch": 0
},
"configurePresets": [
{
"name": "conf-common",
"description": "General settings that apply to all configurations",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}",
"cacheVariables": {
"CMAKE_CUDA_ARCHITECTURES": "native"
},
"condition": {
"type": "inList",
"string": "${hostSystemName}",
"list": [
"Linux",
"Darwin"
]
},
"vendor": {
"microsoft.com/VisualStudioRemoteSettings/CMake/1.0": {
"sourceDir": "$env{HOME}/.vs/$ms{projectDirName}"
}
}
},
{
"name": "gcc-debug",
"displayName": "gcc Debug",
"description": "Target with the gcc compiler, debug build type",
"inherits": "conf-common",
"cacheVariables": {
"CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_COMPILER": "g++",
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "gcc-release",
"displayName": "gcc Release",
"description": "Target with the gcc compiler, release build type",
"inherits": "conf-common",
"cacheVariables": {
"CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_COMPILER": "g++",
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "clang-debug",
"displayName": "clang Debug",
"description": "Target with the clang compiler, debug build type",
"inherits": "conf-common",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "clang-release",
"displayName": "clang Release",
"description": "Target with the clang compiler, release build type",
"inherits": "conf-common",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "conf-sanitizer-common",
"description": "Common settings for sanitizer builds",
"hidden": true,
"inherits": "conf-common"
},
{
"name": "conf-asan-env",
"description": "Common environment variables for AddressSanitizer builds",
"hidden": true,
"inherits": "conf-sanitizer-common",
"environment": {
"ASAN_OPTIONS": "protect_shadow_gap=0:check_initialization_order=1:strict_init_order=1:print_stats=1:atexit=1",
"LSAN_OPTIONS": "print_stats=1:suppressions=${sourceDir}/tools/lsan_suppressions.txt",
"UBSAN_OPTIONS": "print_stats=1:halt_on_error=1:suppressions=${sourceDir}/tools/ubsan_suppressions.txt"
}
},
{
"name": "conf-tsan-env",
"description": "Common environment variables for ThreadSanitizer builds",
"hidden": true,
"inherits": "conf-sanitizer-common",
"environment": {
"TSAN_OPTIONS": "print_stats=1:halt_on_error=1:suppressions=${sourceDir}/tools/tsan_suppressions.txt"
}
},
{
"name": "clang-asan-debug",
"displayName": "clang ASan+UBSan+LSan Debug",
"description": "clang with AddressSanitizer, UndefinedBehaviorSanitizer, and LeakSanitizer",
"inherits": ["conf-asan-env", "clang-debug"],
"cacheVariables": {
"ENABLE_SANITIZER_ADDRESS": "ON",
"ENABLE_SANITIZER_UNDEFINED": "ON",
"ENABLE_SANITIZER_LEAK": "ON"
}
},
{
"name": "clang-asan-release",
"displayName": "clang ASan+UBSan+LSan Release",
"description": "clang with AddressSanitizer, UndefinedBehaviorSanitizer, and LeakSanitizer",
"inherits": ["conf-asan-env", "clang-release"],
"cacheVariables": {
"ENABLE_SANITIZER_ADDRESS": "ON",
"ENABLE_SANITIZER_UNDEFINED": "ON",
"ENABLE_SANITIZER_LEAK": "ON"
}
},
{
"name": "clang-tsan-debug",
"displayName": "clang TSan Debug",
"description": "clang with ThreadSanitizer",
"inherits": ["conf-tsan-env", "clang-debug"],
"cacheVariables": {
"ENABLE_SANITIZER_THREAD": "ON"
}
},
{
"name": "clang-tsan-release",
"displayName": "clang TSan Release",
"description": "clang with ThreadSanitizer",
"inherits": ["conf-tsan-env", "clang-release"],
"cacheVariables": {
"ENABLE_SANITIZER_THREAD": "ON"
}
},
{
"name": "gcc-asan-debug",
"displayName": "gcc ASan+UBSan+LSan Debug",
"description": "gcc with AddressSanitizer, UndefinedBehaviorSanitizer, and LeakSanitizer",
"inherits": ["conf-asan-env", "gcc-debug"],
"cacheVariables": {
"ENABLE_SANITIZER_ADDRESS": "ON",
"ENABLE_SANITIZER_UNDEFINED": "ON",
"ENABLE_SANITIZER_LEAK": "ON"
}
},
{
"name": "gcc-asan-release",
"displayName": "gcc ASan+UBSan+LSan Release",
"description": "gcc with AddressSanitizer, UndefinedBehaviorSanitizer, and LeakSanitizer",
"inherits": ["conf-asan-env", "gcc-release"],
"cacheVariables": {
"ENABLE_SANITIZER_ADDRESS": "ON",
"ENABLE_SANITIZER_UNDEFINED": "ON",
"ENABLE_SANITIZER_LEAK": "ON"
}
},
{
"name": "gcc-tsan-debug",
"displayName": "gcc TSan Debug",
"description": "gcc with ThreadSanitizer",
"inherits": ["conf-tsan-env", "gcc-debug"],
"cacheVariables": {
"ENABLE_SANITIZER_THREAD": "ON"
}
},
{
"name": "gcc-tsan-release",
"displayName": "gcc TSan Release",
"description": "gcc with ThreadSanitizer",
"inherits": ["conf-tsan-env", "gcc-release"],
"cacheVariables": {
"ENABLE_SANITIZER_THREAD": "ON"
}
}
],
"testPresets": [
{
"name": "test-common",
"description": "Test CMake settings that apply to all configurations",
"hidden": true,
"output": {
"outputOnFailure": true,
"verbosity": "verbose"
},
"execution": {
"noTestsAction": "error",
"stopOnFailure": true
},
"environment": {
"BENCHMARK_COLOR": "1",
"GTEST_COLOR": "1",
"GTEST_PRINT_TIME": "1"
}
},
{
"name": "gcc-debug",
"displayName": "gcc Debug Tests",
"description": "Enable output and stop on failure",
"inherits": "test-common",
"configurePreset": "gcc-debug"
},
{
"name": "gcc-release",
"displayName": "gcc Release Tests",
"description": "Enable output and stop on failure",
"inherits": "test-common",
"configurePreset": "gcc-release"
},
{
"name": "clang-debug",
"displayName": "clang Debug Tests",
"description": "Enable output and stop on failure",
"inherits": "test-common",
"configurePreset": "clang-debug"
},
{
"name": "clang-release",
"displayName": "clang Release Tests",
"description": "Enable output and stop on failure",
"inherits": "test-common",
"configurePreset": "clang-release"
},
{
"name": "clang-asan-debug",
"displayName": "clang ASan+UBSan+LSan Debug Tests",
"description": "Run tests for clang ASan+UBSan+LSan debug build",
"inherits": "test-common",
"configurePreset": "clang-asan-debug"
},
{
"name": "clang-asan-release",
"displayName": "clang ASan+UBSan+LSan Release Tests",
"description": "Run tests for clang ASan+UBSan+LSan release build",
"inherits": "test-common",
"configurePreset": "clang-asan-release"
},
{
"name": "clang-tsan-debug",
"displayName": "clang TSan Debug Tests",
"description": "Run tests for clang TSan debug build",
"inherits": "test-common",
"configurePreset": "clang-tsan-debug"
},
{
"name": "clang-tsan-release",
"displayName": "clang TSan Release Tests",
"description": "Run tests for clang TSan release build",
"inherits": "test-common",
"configurePreset": "clang-tsan-release"
},
{
"name": "gcc-asan-debug",
"displayName": "gcc ASan+UBSan+LSan Debug Tests",
"description": "Run tests for gcc ASan+UBSan+LSan debug build",
"inherits": "test-common",
"configurePreset": "gcc-asan-debug"
},
{
"name": "gcc-asan-release",
"displayName": "gcc ASan+UBSan+LSan Release Tests",
"description": "Run tests for gcc ASan+UBSan+LSan release build",
"inherits": "test-common",
"configurePreset": "gcc-asan-release"
},
{
"name": "gcc-tsan-debug",
"displayName": "gcc TSan Debug Tests",
"description": "Run tests for gcc TSan debug build",
"inherits": "test-common",
"configurePreset": "gcc-tsan-debug"
},
{
"name": "gcc-tsan-release",
"displayName": "gcc TSan Release Tests",
"description": "Run tests for gcc TSan release build",
"inherits": "test-common",
"configurePreset": "gcc-tsan-release"
}
]
}