-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakePresets.json
298 lines (297 loc) · 7.49 KB
/
CMakePresets.json
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
292
293
294
295
296
297
298
{
"$schema": "https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json",
"version": 10,
"cmakeMinimumRequired": {
"major": 3,
"minor": 31,
"patch": 0
},
"configurePresets": [
{
"name": "common",
"hidden": true,
"binaryDir": "${sourceDir}/.build/${presetName}",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": {
"type": "BOOL",
"value": "ON"
},
"CMAKE_UNITY_BUILD": {
"type": "BOOL",
"value": "ON"
},
"CMAKE_UNITY_BUILD_BATCH_SIZE": {
"type": "STRING",
"value": "32"
},
"CMAKE_CONFIGURATION_TYPES": {
"type": "STRING",
"value": "Debug;Release;RelWithDebInfo;MinSizeRel;"
}
},
"environment":
{
"MY_ENVIRONMENT_VARIABLE": "just_example"
},
"vendor":
{
"$comment": [
"This is just example of custom settings",
"for any vendor IDE or else",
"Preset files specifying version 10 or above",
"may include comments using the key $comment",
"at any level within the JSON object to provide documentation"
],
"example.com/ExampleIDE/1.0": {
"autoFormat": true
},
"qt.io/QtCreator/1.0": {
"debugger":
{
"DisplayName": "GNU gdb 11.2.0 for MinGW 11.2.0 64-bit",
"Abis": ["x86-windows-msys-pe-64bit"],
"Binary": "C:/Qt/Tools/mingw1120_64/bin/gdb.exe",
"EngineType": 1,
"Version": "11.2.0"
}
}
}
},
{
"name": "vcpkg",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/vcpkg",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"CMAKE_MAKE_PROGRAM": "ninja",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"$comment": "We have to build boost to match version 1.86.0",
"OM_BUILD_BOOST": "OFF"
}
},
{
"name": "ninja-multi",
"inherits": "common",
"displayName": "Ninja Multi-Config",
"description": "build using Ninja generator",
"generator": "Ninja Multi-Config",
"binaryDir": "${sourceDir}/build/ninja-multi",
"cacheVariables": {
}
},
{
"name": "ninja",
"inherits": "common",
"displayName": "Ninja",
"description": "build using Ninja generator",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": {
"type": "STRING",
"value": "Debug"
},
"$comment": "We have to build boost to match version 1.87",
"OM_BUILD_BOOST": "ON"
}
},
{
"name": "ninja-llvm",
"inherits": "ninja",
"displayName": "Ninja-llvm",
"description": "build using Ninja generator",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/ninja-llvm",
"cacheVariables": {
"CMAKE_CXX_COMPILER": {
"type": "INTERNAL",
"value": "clang++"
},
"CMAKE_CXX_FLAGS": {
"type": "STRING",
"value": "-stdlib=libc++"
},
"CMAKE_C_COMPILER": {
"type": "INTERNAL",
"value": "clang"
},
"CMAKE_CXX_SCAN_FOR_MODULES": {
"type": "INTERNAL",
"value": "ON"
},
"CMAKE_CXX_MODULE_STD": {
"type": "INTERNAL",
"value": "ON"
},
"OM_CLANG_TIDY": "ON",
"$comment": "We have to build boost with clang++ cause of libc++",
"OM_BUILD_BOOST": "ON"
}
},
{
"name": "ninja-clang",
"inherits": "ninja",
"displayName": "Ninja-clang",
"description": "build using Ninja generator and clang++ compiler",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/ninja-clang",
"cacheVariables": {
"CMAKE_CXX_COMPILER": {
"type": "INTERNAL",
"value": "clang++"
},
"CMAKE_C_COMPILER": {
"type": "INTERNAL",
"value": "clang"
},
"OM_CLANG_TIDY": "ON",
"$comment": "We have to build boost with clang++ to match version 1.87",
"OM_BUILD_BOOST": "ON"
}
},
{
"name": "xcode",
"inherits": "common",
"displayName": "xcode",
"description": "build using Xcode generator",
"generator": "Xcode",
"binaryDir": "${sourceDir}/build/xcode",
"cacheVariables": {
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
},
{
"name": "vs2022-x64",
"inherits": "common",
"generator": "Visual Studio 17 2022",
"displayName": "Visual Studio 17 2022",
"description": "build using Visual Studio 17 2022 generator",
"architecture": "x64",
"toolset": "v143",
"binaryDir": "${sourceDir}/build/vs2022-x64",
"cacheVariables": {
"CMAKE_MSVC_RUNTIME_LIBRARY": {
"type": "INTERNAL",
"value": "MultiThreaded$<$<CONFIG:Debug>:Debug>"
}
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "mingw",
"inherits": "ninja",
"displayName": "MinGW Makefiles",
"binaryDir": "${sourceDir}/build/mingw",
"description": "This build MinGW Makefiles on Windows",
"generator": "MinGW Makefiles",
"cacheVariables": {
"CMAKE_CXX_COMPILER": {
"type": "INTERNAL",
"value": "g++"
},
"CMAKE_C_COMPILER": {
"type": "INTERNAL",
"value": "gcc"
}
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
}
],
"buildPresets": [
{
"name": "vcpkg",
"configurePreset": "vcpkg"
},
{
"name": "ninja",
"configurePreset": "ninja"
},
{
"name": "ninja-multi",
"configurePreset": "ninja-multi"
},
{
"name": "ninja-llvm",
"configurePreset": "ninja-llvm"
},
{
"name": "ninja-clang",
"configurePreset": "ninja-clang"
},
{
"name": "xcode",
"configurePreset": "xcode"
},
{
"name": "vs2022-x64",
"configurePreset": "vs2022-x64"
},
{
"name": "mingw",
"configurePreset": "mingw"
}
],
"testPresets": [
{
"name": "ninja",
"configurePreset": "ninja",
"output": {"outputOnFailure": true},
"execution": {"noTestsAction": "error", "stopOnFailure": false}
},
{
"name": "vcpkg",
"description": "vcpkg presets config description tests",
"configurePreset": "vcpkg",
"output": {
"shortProgress": true,
"verbosity": "verbose",
"outputOnFailure": true},
"execution": {
"stopOnFailure": false,
"enableFailover": true,
"jobs": 1,
"noTestsAction": "error" }
}
],
"packagePresets": [
{
"name": "zip",
"configurePreset": "ninja"
}
],
"workflowPresets": [
{
"name": "ninja",
"steps": [
{
"type": "configure",
"name": "ninja"
},
{
"type": "build",
"name": "ninja"
},
{
"type": "test",
"name": "ninja"
},
{
"type": "package",
"name": "zip"
}
]
}
]
}