Skip to content

Commit 018bcff

Browse files
committed
build: add shared CMake presets
1 parent 29ea23e commit 018bcff

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

CMakePresets.json

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"version": 3,
3+
"cmakeMinimumRequired": {
4+
"major": 3,
5+
"minor": 20,
6+
"patch": 0
7+
},
8+
"configurePresets": [
9+
{
10+
"name": "dev-debug",
11+
"displayName": "Local Debug",
12+
"description": "Default local debug build with tests enabled.",
13+
"binaryDir": "${sourceDir}/build/dev-debug",
14+
"cacheVariables": {
15+
"BUILD_TESTING": "ON",
16+
"CMAKE_BUILD_TYPE": "Debug",
17+
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
18+
}
19+
},
20+
{
21+
"name": "ci-release",
22+
"displayName": "CI-style Release",
23+
"description": "Release build that matches the repository CI flags.",
24+
"binaryDir": "${sourceDir}/build/ci-release",
25+
"cacheVariables": {
26+
"BUILD_TESTING": "ON",
27+
"CMAKE_BUILD_TYPE": "Release"
28+
}
29+
}
30+
],
31+
"buildPresets": [
32+
{
33+
"name": "dev-debug",
34+
"configurePreset": "dev-debug",
35+
"configuration": "Debug"
36+
},
37+
{
38+
"name": "ci-release",
39+
"configurePreset": "ci-release",
40+
"configuration": "Release"
41+
}
42+
],
43+
"testPresets": [
44+
{
45+
"name": "dev-debug",
46+
"configurePreset": "dev-debug",
47+
"configuration": "Debug",
48+
"output": {
49+
"outputOnFailure": true
50+
}
51+
},
52+
{
53+
"name": "ci-release",
54+
"configurePreset": "ci-release",
55+
"configuration": "Release",
56+
"output": {
57+
"outputOnFailure": true
58+
}
59+
}
60+
]
61+
}

0 commit comments

Comments
 (0)