-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakePresets.json
142 lines (142 loc) · 3.6 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
{
"version": 8,
"$schema": "https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json",
"cmakeMinimumRequired": {
"major": 3,
"minor": 29,
"patch": 0
},
"configurePresets": [
{
"name": "base",
"description": "Set some basic directories",
"hidden": true,
"binaryDir": "${sourceDir}/builds/${presetName}",
"installDir": "${sourceDir}/install/${presetName}",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"CMAKE_RUNTIME_OUTPUT_DIRECTORY": "${sourceDir}/bin",
"CMAKE_MODULE_PATH": "${sourceDir}/cmake"
}
},
{
"name": "vcpkg",
"hidden": true,
"description": "Configure VCPkg toolchain",
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"environment": {
"VCPKG_FEATURE_FLAGS": "manifests,versions,binarycaching,registries"
}
},
{
"name": "ninja",
"displayName": "Ninja build",
"description": "Generate Ninja project files for current configuration",
"hidden": true,
"generator": "Ninja"
},
{
"name": "ninja-multi-config",
"displayName": "Ninja Build Multi-Config",
"description": "Generate Ninja project files for all configurations",
"hidden": true,
"generator": "Ninja Multi-Config"
},
{
"name": "msvc-x64",
"displayName": "MS Visual C++ x64 configuration",
"hidden": true,
"architecture": {
"value": "x64",
"strategy": "external"
},
"toolset": {
"value": "host=x64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_CXX_COMPILER": "cl.exe",
"CMAKE_CXX_FLAGS": "/utf-8 /EHsc /W4 /permissive- /Zc:__cplusplus /Zc:preprocessor /Zc:throwingNew /Zc:inline /Zc:externConstexpr /Zc:templateScope /Zc:checkGwOdr /Zc:enumTypes"
}
},
{
"name": "windows-default",
"displayName": "Windows x64 Build",
"inherits": [
"base",
"vcpkg",
"ninja",
"msvc-x64"
],
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "clang-x64",
"displayName": "LLVM Clang++ configuration",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_CXX_FLAGS": "-stdlib=libc++ -std=c++23 -Wall -Wextra",
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/cmake",
"VCPKG_TARGET_TRIPLET": "x64-linux-libcxx"
},
"environment": {
"CC": "clang",
"CXX": "clang++"
}
},
{
"name": "Linux-Default",
"displayName": "Linux x64 Build",
"inherits": [
"base",
"vcpkg",
"ninja",
"clang-x64"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
}
],
"buildPresets": [
{
"name": "windows-debug",
"configurePreset": "windows-default",
"displayName": "Windows Debug",
"description": "Build using ninja multi vcpkg debug configuration for windows",
"configuration": "Debug"
},
{
"name": "windows-release",
"configurePreset": "windows-default",
"displayName": "Windows Release",
"description": "Build using ninja multi vcpkg release configuration for windows",
"configuration": "Release",
"cleanFirst": true
},
{
"name": "windows-relwithdebinfo",
"configurePreset": "windows-default",
"displayName": "Windows RelWithDebInfo",
"description": "Build using ninja multi vcpkg relwithdebinfo configuration for windows",
"configuration": "RelWithDebInfo"
},
{
"name": "linux-debug",
"configurePreset": "Linux-Default",
"displayName": "Linux Debug",
"description": "Build using ninja, debug configuration for Linux",
"configuration": "Debug"
}
]
}