Skip to content

Commit d210e21

Browse files
committed
Add preset
1 parent 874d6c8 commit d210e21

2 files changed

Lines changed: 136 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
22

33
project(Piccolo VERSION 0.1.0)
44

CMakePresets.json

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
{
2+
"version": 10,
3+
"configurePresets": [
4+
{
5+
"name": "ninja-base",
6+
"hidden": true,
7+
"description": "config-base, use Ninja, set binaryDir and installDir",
8+
"generator": "Ninja",
9+
"binaryDir": "${sourceDir}/build/",
10+
"condition": {
11+
"type": "not",
12+
"condition": {
13+
"type": "equals",
14+
"lhs": "${hostSystemName}",
15+
"rhs": "Windows"
16+
}
17+
}
18+
},
19+
{
20+
"name": "win-msvc",
21+
"description": "Windows x64 config (MSVC + Ninja Multi-Config)",
22+
"inherits": "ninja-base",
23+
"generator": "Ninja Multi-Config",
24+
"cacheVariables": {
25+
"CMAKE_CONFIGURATION_TYPES": "Debug;Release",
26+
"CMAKE_CXX_COMPILER": "cl.exe",
27+
"CMAKE_C_COMPILER": "cl.exe"
28+
},
29+
"architecture": {
30+
"value": "x64",
31+
"strategy": "external"
32+
} ,
33+
"condition": {
34+
"type": "equals",
35+
"lhs": "${hostSystemName}",
36+
"rhs": "Windows"
37+
}
38+
},
39+
{
40+
"name": "win-clang",
41+
"description": "Windows x64 config (Clang + MinGW + Ninja Multi-Config), not support STD Module",
42+
"inherits": "win-msvc",
43+
"generator": "Ninja Multi-Config",
44+
"cacheVariables": {
45+
"CMAKE_CONFIGURATION_TYPES": "Debug;Release",
46+
"CMAKE_CXX_COMPILER": "clang++",
47+
"CMAKE_C_COMPILER": "clang"
48+
}
49+
},
50+
{
51+
"name": "unix-gnu-debug",
52+
"description": "Linux/macOS GNU Debug config presets(GNU + Ninja)",
53+
"inherits": "ninja-base",
54+
"cacheVariables": {
55+
"CMAKE_BUILD_TYPE": "Debug",
56+
"CMAKE_CXX_COMPILER": "g++",
57+
"CMAKE_C_COMPILER": "gcc"
58+
}
59+
},
60+
{
61+
"name": "unix-gnu-release",
62+
"description": "Linux/macOS GNU Release config presets(GNU + Ninja)",
63+
"inherits": "ninja-base",
64+
"cacheVariables": {
65+
"CMAKE_BUILD_TYPE": "Release",
66+
"CMAKE_CXX_COMPILER": "g++",
67+
"CMAKE_C_COMPILER": "gcc"
68+
}
69+
},
70+
{
71+
"name": "unix-clang-debug",
72+
"description": "Linux/macOS Clang Debug config presets(Clang + Ninja)",
73+
"inherits": "ninja-base",
74+
"cacheVariables": {
75+
"CMAKE_CXX_FLAGS": "-stdlib=libc++",
76+
"CMAKE_BUILD_TYPE": "Debug",
77+
"CMAKE_CXX_COMPILER": "clang++",
78+
"CMAKE_C_COMPILER": "clang"
79+
}
80+
},
81+
{
82+
"name": "unix-clang-release",
83+
"description": "Linux/macOS Clang Release config presets(Clang + Ninja)",
84+
"inherits": "ninja-base",
85+
"cacheVariables": {
86+
"CMAKE_CXX_FLAGS": "-stdlib=libc++",
87+
"CMAKE_BUILD_TYPE": "Release",
88+
"CMAKE_CXX_COMPILER": "clang++",
89+
"CMAKE_C_COMPILER": "clang"
90+
}
91+
}
92+
],
93+
"buildPresets": [
94+
{
95+
"name": "win-msvc-debug",
96+
"configurePreset": "win-msvc",
97+
"configuration": "Debug"
98+
},
99+
{
100+
"name": "win-msvc-release",
101+
"configurePreset": "win-msvc",
102+
"configuration": "Release"
103+
},
104+
{
105+
"name": "win-clang-debug",
106+
"configurePreset": "win-clang",
107+
"configuration": "Debug"
108+
},
109+
{
110+
"name": "win-clang-release",
111+
"configurePreset": "win-clang",
112+
"configuration": "Release"
113+
},
114+
{
115+
"name": "unix-gnu-debug",
116+
"configurePreset": "unix-gnu-debug",
117+
"configuration": "Debug"
118+
},
119+
{
120+
"name": "unix-gnu-release",
121+
"configurePreset": "unix-gnu-release",
122+
"configuration": "Release"
123+
},
124+
{
125+
"name": "unix-clang-debug",
126+
"configurePreset": "unix-clang-debug",
127+
"configuration": "Debug"
128+
},
129+
{
130+
"name": "unix-clang-release",
131+
"configurePreset": "unix-clang-release",
132+
"configuration": "Release"
133+
}
134+
]
135+
}

0 commit comments

Comments
 (0)