-
Notifications
You must be signed in to change notification settings - Fork 42
/
CMakePresets.json
167 lines (167 loc) · 6.21 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21
},
"configurePresets": [
{
"name": "fullrelease",
"displayName": "Build Everything in Release Mode",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build-rel",
"installDir": "${sourceDir}/build-rel/install",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"FREECIV_ENABLE_TOOLS": "ON",
"FREECIV_ENABLE_SERVER": "ON",
"FREECIV_ENABLE_CLIENT": "ON",
"FREECIV_ENABLE_NLS": "ON"
}
},
{
"name": "fullrelease-macos",
"displayName": "Build for Mac in Release Mode",
"inherits": "fullrelease",
"installDir": ".install",
"cacheVariables": {
"FREECIV_USE_VCPKG": "ON",
"CMAKE_FIND_PACKAGE_PREFER_CONFIG": "ON"
}
},
{
"name": "debug",
"displayName": "Build Server and Client only in Debug Mode",
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"FREECIV_ENABLE_TOOLS": "OFF",
"FREECIV_ENABLE_SERVER": "ON",
"FREECIV_ENABLE_CLIENT": "ON",
"FREECIV_ENABLE_NLS": "OFF"
}
},
{
"name": "ASan",
"displayName": "Build Everything in debug mode with ASan and ccache",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CMAKE_CXX_FLAGS": "-O2 -DGLIBCXX_ASSERTIONS -fsanitize=address -fsanitize=leak -fsanitize=undefined -fsanitize-address-use-after-scope -fsanitize-recover=all",
"CMAKE_C_FLAGS": "-O2 -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection",
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
"FREECIV_ENABLE_TOOLS": "ON",
"FREECIV_ENABLE_SERVER": "ON",
"FREECIV_ENABLE_CLIENT": "ON",
"FREECIV_ENABLE_NLS": "ON"
}
},
{
"name": "DistroRelease",
"displayName": "Build Everything with default flags in major distros ",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "None",
"CMAKE_CXX_FLAGS": "-O2 -g -Wp,-DGLIBCXX_ASSERTIONS -O2 -g -Wformat -Wall -Wextra -Werror=format-security -Werror=return-type -fcf-protection -U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -flto=auto -DNDEBUG -Wno-sign-compare -Warray-bounds -Wdelete-incomplete -Wint-in-bool-context -Wreturn-type -Wsequence-point -Wswitch -Wunused-value -Wmaybe-uninitialized -Wstringop-truncation -fPIC -march=x86-64 -mtune=generic -pipe -fno-plt -fexceptions -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto",
"CMAKE_C_FLAGS": "-O2 -g -O2 -g -Wformat -Wall -Wextra -Werror=format-security -Werror=return-type -fcf-protection -U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -flto=auto -DNDEBUG -Wno-sign-compare -Warray-bounds -Wdelete-incomplete -Wint-in-bool-context -Wreturn-type -Wsequence-point -Wswitch -Wunused-value -Wmaybe-uninitialized -Wstringop-truncation -fPIC -march=x86-64 -mtune=generic -pipe -fno-plt -fexceptions -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto",
"FREECIV_ENABLE_TOOLS": "ON",
"FREECIV_ENABLE_SERVER": "ON",
"FREECIV_ENABLE_CLIENT": "ON",
"FREECIV_ENABLE_NLS": "ON"
}
},
{
"name": "clazy",
"displayName": "Check for clazy warnings",
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/build-clazy",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"FREECIV_ENABLE_TOOLS": "ON",
"FREECIV_ENABLE_SERVER": "ON",
"FREECIV_ENABLE_CLIENT": "ON",
"FREECIV_ENABLE_NLS": "OFF"
},
"environment": {
"CXX": "clazy",
"CLAZY_CHECKS": "level2,no-qstring-allocations,no-ctor-missing-parent-argument,no-missing-qobject-macro"
}
},
{
"name": "windows-release",
"description": "Target Windows with the Visual Studio development environment (Release)",
"generator": "Visual Studio 17 2022",
"binaryDir": "${sourceDir}/build-vs",
"installDir": "${sourceDir}/build-vs/install",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"FREECIV_ENABLE_TOOLS": "ON",
"FREECIV_ENABLE_SERVER": "ON",
"FREECIV_ENABLE_CLIENT": "ON",
"FREECIV_ENABLE_NLS": "ON",
"FREECIV_USE_VCPKG": "ON"
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
"intelliSenseMode": "windows-clang-x64",
"enableClangTidyCodeAnalysis": true,
"enableMicrosoftCodeAnalysis": true
}
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "windows-debug",
"description": "Target Windows with the Visual Studio development environment (Debug)",
"generator": "Visual Studio 17 2022",
"binaryDir": "${sourceDir}/build-vs",
"installDir": "${sourceDir}/build-vs/install",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"FREECIV_ENABLE_TOOLS": "ON",
"FREECIV_ENABLE_SERVER": "ON",
"FREECIV_ENABLE_CLIENT": "ON",
"FREECIV_ENABLE_NLS": "ON",
"FREECIV_USE_VCPKG": "ON"
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
"intelliSenseMode": "windows-clang-x64",
"enableClangTidyCodeAnalysis": true,
"enableMicrosoftCodeAnalysis": true
}
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
}
],
"buildPresets": [
{
"name": "fullrelease",
"configurePreset": "fullrelease"
},
{
"name": "fullrelease-macos",
"configurePreset": "fullrelease-macos",
"targets": "install"
},
{
"name": "fullrelease-windows",
"configurePreset": "windows-release"
},
{
"name": "debug-windows",
"configurePreset": "windows-debug"
}
]
}