Skip to content

Commit b3c0f52

Browse files
committed
cmake: dbg/rel presets
1 parent 52836c5 commit b3c0f52

3 files changed

Lines changed: 60 additions & 31 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
with: {name: PATH, value: "$PATH:$VCPKG_ROOT"}
4242
- name: generate cmake build files
4343
run: |
44-
cmake build/cmake --preset native
44+
cmake build/cmake --preset ${{ matrix.config }}
4545
- name: build
4646
run: |
4747
cd build/cmake
@@ -87,7 +87,7 @@ jobs:
8787
run: brew install cmake
8888
- name: generate cmake build files
8989
run: |
90-
cmake build/cmake --preset native
90+
cmake build/cmake --preset ${{ matrix.config }}
9191
- name: build
9292
run: |
9393
cd build/cmake
@@ -128,7 +128,7 @@ jobs:
128128
run: New-Item -ItemType SymbolicLink -Path vcpkg-installation -Target $env:VCPKG_ROOT
129129
- name: generate cmake build files
130130
run: |
131-
cmake build/cmake --preset native -A ${{ matrix.arch }}
131+
cmake build/cmake --preset ${{ matrix.config }} -A ${{ matrix.arch }}
132132
- name: build
133133
run: |
134134
cd build/cmake
@@ -181,7 +181,7 @@ jobs:
181181
run: brew install cmake
182182
- name: generate cmake build files
183183
run: |
184-
cmake build/cmake --preset ios
184+
cmake build/cmake --preset ios-${{ matrix.config }}
185185
- name: build
186186
run: |
187187
cd build/cmake

build/cmake/CMakePresets.json

Lines changed: 55 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,39 @@
1616
"binaryDir": "${sourceDir}/../../out/${presetName}/"
1717
},
1818
{
19-
"name": "native",
19+
"name": "rel",
2020
"inherits": "base",
21-
"description": "host platform native config, not cross-building"
21+
"description": "host platform native config, not cross-building, release build",
22+
"cacheVariables": {
23+
"CMAKE_BUILD_TYPE": "Release"
24+
}
2225
},
2326
{
24-
"name": "ios",
27+
"name": "dbg",
28+
"inherits": "base",
29+
"description": "host platform native config, not cross-building, debug build",
30+
"cacheVariables": {
31+
"CMAKE_BUILD_TYPE": "Debug"
32+
}
33+
},
34+
{
35+
"name": "ios-dbg",
2536
"inherits": "base",
26-
"description": "cross-building on macos for ios",
37+
"description": "cross-building on macos for ios, debug build",
2738
"generator": "Xcode",
2839
"cacheVariables": {
29-
"CMAKE_SYSTEM_NAME": "iOS"
40+
"CMAKE_SYSTEM_NAME": "iOS",
41+
"CMAKE_BUILD_TYPE": "Debug"
42+
}
43+
},
44+
{
45+
"name": "ios-rel",
46+
"inherits": "base",
47+
"description": "cross-building on macos for ios, release build",
48+
"generator": "Xcode",
49+
"cacheVariables": {
50+
"CMAKE_SYSTEM_NAME": "iOS",
51+
"CMAKE_BUILD_TYPE": "Release"
3052
}
3153
}
3254
],
@@ -41,12 +63,23 @@
4163
},
4264
{
4365
"$comment": [
44-
"native-base preset"
66+
"native debug preset"
4567
],
46-
"hidden": true,
47-
"name": "native",
68+
"hidden": false,
69+
"name": "dbg",
70+
"inherits": "base",
71+
"configurePreset": "dbg",
72+
"configuration": "Debug"
73+
},
74+
{
75+
"$comment": [
76+
"native release preset"
77+
],
78+
"hidden": false,
79+
"name": "rel",
4880
"inherits": "base",
49-
"configurePreset": "native"
81+
"configurePreset": "rel",
82+
"configuration": "Release"
5083
},
5184
{
5285
"$comment": [
@@ -62,28 +95,24 @@
6295
]
6396
},
6497
{
65-
"name": "rel",
66-
"description": "native release build",
67-
"inherits": "native",
68-
"configuration": "Release"
69-
},
70-
{
71-
"name": "dbg",
72-
"description": "native debug build",
73-
"inherits": "native",
98+
"$comment": [
99+
"ios debug preset"
100+
],
101+
"hidden": false,
102+
"name": "ios-dbg",
103+
"inherits": "base",
104+
"configurePreset": "ios-dbg",
74105
"configuration": "Debug"
75106
},
76107
{
108+
"$comment": [
109+
"ios release preset"
110+
],
111+
"hidden": false,
77112
"name": "ios-rel",
78-
"description": "ios release build",
79-
"inherits": "ios",
113+
"inherits": "base",
114+
"configurePreset": "ios-rel",
80115
"configuration": "Release"
81-
},
82-
{
83-
"name": "ios-dbg",
84-
"description": "ios debug build",
85-
"inherits": "ios",
86-
"configuration": "Debug"
87116
}
88117
]
89118
}

repos/utki

0 commit comments

Comments
 (0)