Skip to content

Commit a243a1c

Browse files
authored
CMake: Migrate VS-only and deprecated CMakeSettings to CMakePresets (#107)
CMakePresets is a CMake standard that works in many IDEs
1 parent bc02e9e commit a243a1c

File tree

2 files changed

+69
-40
lines changed

2 files changed

+69
-40
lines changed

CMakePresets.json

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"version": 6,
3+
"cmakeMinimumRequired": {
4+
"major": 3,
5+
"minor": 23,
6+
"patch": 0
7+
},
8+
"configurePresets": [
9+
{
10+
"name": "x64-Release",
11+
"displayName": "x64-Release",
12+
"generator": "Ninja",
13+
"binaryDir": "${sourceDir}/CMakeBuild/build/${presetName}",
14+
"installDir": "${sourceDir}/CMakeBuild/install/${presetName}",
15+
"cacheVariables": {
16+
"CMAKE_BUILD_TYPE": "Release"
17+
},
18+
"environment": {
19+
"VSCMD_ARG_TGT_ARCH": "x64",
20+
"VSCMD_ARG_HOST_ARCH": "x64"
21+
}
22+
},
23+
{
24+
"name": "x64-RelWithDebInfo",
25+
"displayName": "x64-RelWithDebInfo",
26+
"generator": "Ninja",
27+
"binaryDir": "${sourceDir}/CMakeBuild/build/${presetName}",
28+
"installDir": "${sourceDir}/CMakeBuild/install/${presetName}",
29+
"cacheVariables": {
30+
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
31+
},
32+
"environment": {
33+
"VSCMD_ARG_TGT_ARCH": "x64",
34+
"VSCMD_ARG_HOST_ARCH": "x64"
35+
}
36+
},
37+
{
38+
"name": "x64-Debug",
39+
"displayName": "x64-Debug",
40+
"generator": "Ninja",
41+
"binaryDir": "${sourceDir}/CMakeBuild/build/${presetName}",
42+
"installDir": "${sourceDir}/CMakeBuild/install/${presetName}",
43+
"cacheVariables": {
44+
"CMAKE_BUILD_TYPE": "Debug"
45+
},
46+
"environment": {
47+
"VSCMD_ARG_TGT_ARCH": "x64",
48+
"VSCMD_ARG_HOST_ARCH": "x64"
49+
}
50+
}
51+
],
52+
"buildPresets": [
53+
{
54+
"name": "x64-Release",
55+
"configurePreset": "x64-Release",
56+
"verbose": true
57+
},
58+
{
59+
"name": "x64-RelWithDebInfo",
60+
"configurePreset": "x64-RelWithDebInfo",
61+
"verbose": true
62+
},
63+
{
64+
"name": "x64-Debug",
65+
"configurePreset": "x64-Debug",
66+
"verbose": true
67+
}
68+
]
69+
}

CMakeSettings.json

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)