-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathCMakeSettings.json
More file actions
211 lines (211 loc) · 13.7 KB
/
CMakeSettings.json
File metadata and controls
211 lines (211 loc) · 13.7 KB
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
{
"environments": [
{
// /EHsc Tell the compiler that exceptions can only occur at a throw statement or at a function call.
// /bigobj Our event model spawns a large number of objects. By default, an object file can hold up to 65,279 (almost 2^16) addressable sections. This limit applies no matter which target platform is specified. /bigobj increases that address capacity to 4,294,967,296 (2^32).
// /utf-8 All literals in our source code are in UTF-8 format.
// /Zc:preprocessor Enable a new, modern preprocessor that is fully conformant to C99, C++11, and later standards.
"WIN32_CXX_FLAGS": "/EHsc /bigobj /utf-8 /Zc:preprocessor",
// /MTd Static debug build (don't rely on the shared dlls).
// /DDEBUG Define the preprocessor symbol DEBUG.
// /Zi Generate complete debugging information (.PDB files) to allow for source-level debugging in Visual Studio.
// /Ob0 Disable all inlining.
// /Od Disable all compiler optimizations.
// /RTC1 Enable stack frame run-time checking (local variables uninitialized) and detects when smaller variables are assigned larger values and data is lost.
// /W4 Set the compiler warning level to 4 (maximum standard level).
"WIN32_CXX_FLAGS_DEBUG": "/MTd /DDEBUG /Zi /Ob0 /Od /RTC1 /W4",
// /MT Static release build (don't rely on the shared dlls).
// /DNDEBUG Define the preprocessor symbol NDEBUG to disable assertions.
// /O2 Optimize speed (and code size).
"WIN32_CXX_FLAGS_RELEASE": "/MT /O2 /DNDEBUG /Zi /W4",
// /DEBUG (Negative performance impact) Generate PDB files and disable certain linker-time optimizations that rely on stripping symbols or combining identical code sections.
// /OPT:REF (Positive performance impact) Eliminate functions and data that are never referenced (Dead Code Elimination).
// /OPT:ICF (Positive performance impact) Enable "Identical COMDAT Folding," which tells the linker to merge identical pieces of code or read-only data.
"WIN32_EXE_LINKER_FLAGS_RELEASE": "/DEBUG /OPT:REF /OPT:ICF",
// Set executable file built-in icon (applied in CMakeLists.txt).
"WIN32_RESOURCES": ".resources/images/vtm.rc",
// -static Tell the linker to avoid dynamic libraries for all dependencies.
// -static-libstdc++ Statically link the standard C++ library (GNU C++ standard library).
// -pthread Use POSIX Threads (Pthreads), a standard API for multithreading.
// -Wall -Wextra Enable all+extra Warnings.
// -Wno-missing-field-initializers Disable a specific warning about missing field initializers in C-style aggregate initializations.
"LINUX_CXX_FLAGS": "-static -static-libstdc++ -pthread -Wall -Wextra -Wno-missing-field-initializers",
// -O0 Disable all compiler optimizations.
// -O2 Optimize speed (and code size).
// -g Generate native debugging information.
// -s Strip all symbols from the output binary.
// -Wno-psabi Disable warnings related to the Platform Application Binary Interface (PSABI) when using GCC.
"LINUX_CXX_FLAGS_DEBUG": "-O0 -g -DDEBUG",
"LINUX_CXX_FLAGS_RELEASE": "-O2 -s -DNDEBUG -Wno-psabi",
"LINUX_CMAKE_TOOLCHAIN_FILE": "~/vcpkg/scripts/buildsystems/vcpkg.cmake",
// Disable dynamic loading support (dlopen) in Lua.
"VCPKG_CMAKE_CONFIGURE_OPTIONS": "-ULUA_USE_DLOPEN"
}
],
"configurations": [
{
"name": "1.Win-x64-Debug",
"generator": "Visual Studio 17 2022 Win64",
"configurationType": "Debug",
"buildRoot": "${workspaceRoot}/.vs/build/${name}",
"installRoot": "${workspaceRoot}/.vs/build/install/${name}",
"intelliSenseMode": "windows-msvc-x64",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": [{ "name": "CMAKE_CXX_FLAGS_DEBUG", "value": "${env.WIN32_CXX_FLAGS_DEBUG} ${env.WIN32_CXX_FLAGS}" },
{ "name": "CMAKE_MSVC_RUNTIME_LIBRARY", "value": "MultiThreadedDebug" },
{ "name": "VCPKG_TARGET_TRIPLET", "value": "x64-windows-static" }]
},
{
"name": "2.WSL-x64-Debug",
"generator": "Unix Makefiles",
"configurationType": "Debug",
"wslPath": "${defaultWSLPath}",
"buildRoot": "${workspaceRoot}/.vs/build/${name}",
"installRoot": "${workspaceRoot}/.vs/build/install/${name}",
"intelliSenseMode": "linux-gcc-x64",
"inheritEnvironments": [ "linux_x64" ],
"environments": [{ "CXX": "/usr/bin/g++-12",
"CC" : "/usr/bin/gcc-12" }],
"variables": [{ "name": "CMAKE_CXX_FLAGS_DEBUG", "value": "${env.LINUX_CXX_FLAGS} ${env.LINUX_CXX_FLAGS_DEBUG}" },
{ "name": "CMAKE_TOOLCHAIN_FILE", "value": "${env.LINUX_CMAKE_TOOLCHAIN_FILE}" },
{ "name": "VCPKG_TARGET_TRIPLET", "value": "x64-linux" }]
},
{
"name": "3.Win-x32-Debug",
"generator": "Visual Studio 17 2022",
"configurationType": "Debug",
"buildRoot": "${workspaceRoot}/.vs/build/${name}",
"installRoot": "${workspaceRoot}/.vs/build/install/${name}",
"inheritEnvironments": [ "msvc_x86_x64" ],
"variables": [{ "name": "CMAKE_CXX_FLAGS_DEBUG", "value": "${env.WIN32_CXX_FLAGS_DEBUG} ${env.WIN32_CXX_FLAGS}" },
{ "name": "CMAKE_MSVC_RUNTIME_LIBRARY", "value": "MultiThreadedDebug" },
{ "name": "VCPKG_TARGET_TRIPLET", "value": "x86-windows-static" }]
},
{
"name": "4.WSL-x32-Debug",
"generator": "Unix Makefiles",
"configurationType": "Debug",
"wslPath": "${defaultWSLPath}",
"buildRoot": "${workspaceRoot}/.vs/build/${name}",
"installRoot": "${workspaceRoot}/.vs/build/install/${name}",
"intelliSenseMode": "linux-gcc-x86",
"inheritEnvironments": [ "linux_x86" ],
"environments": [{ "CXX": "/usr/bin/i686-linux-gnu-g++-12",
"CC" : "/usr/bin/i686-linux-gnu-gcc-12" }],
"variables": [{ "name": "CMAKE_CXX_FLAGS_DEBUG", "value": "${env.LINUX_CXX_FLAGS} ${env.LINUX_CXX_FLAGS_DEBUG}" },
{ "name": "CMAKE_TOOLCHAIN_FILE", "value": "${env.LINUX_CMAKE_TOOLCHAIN_FILE}" },
{ "name": "VCPKG_TARGET_TRIPLET", "value": "x86-linux" }]
},
{
"name": "5.WSL-ARM64-Debug",
"generator": "Unix Makefiles",
"configurationType": "Debug",
"wslPath": "${defaultWSLPath}",
"buildRoot": "${workspaceRoot}/.vs/build/${name}",
"installRoot": "${workspaceRoot}/.vs/build/install/${name}",
"intelliSenseMode": "linux-gcc-arm",
"inheritEnvironments": [ "linux_arm" ],
"environments": [{ "CXX": "/usr/bin/aarch64-linux-gnu-g++-12",
"CC" : "/usr/bin/aarch64-linux-gnu-gcc-12" }],
"variables": [{ "name": "CMAKE_CXX_FLAGS_DEBUG", "value": "${env.LINUX_CXX_FLAGS} ${env.LINUX_CXX_FLAGS_DEBUG}" },
{ "name": "CMAKE_TOOLCHAIN_FILE", "value": "${env.LINUX_CMAKE_TOOLCHAIN_FILE}" },
{ "name": "VCPKG_TARGET_TRIPLET", "value": "arm64-linux" }]
},
{
"name": "PROD-Win-ARM64",
"generator": "Visual Studio 17 2022 ARM64",
"configurationType": "Release",
"buildRoot": "${workspaceRoot}/.vs/build/${name}",
"installRoot": "${workspaceRoot}/.vs/build/install/${name}",
"intelliSenseMode": "windows-msvc-arm64",
"inheritEnvironments": [ "msvc_arm64_x64" ],
"variables": [{ "name": "CMAKE_CXX_FLAGS_RELEASE", "value": "${env.WIN32_CXX_FLAGS_RELEASE} ${env.WIN32_CXX_FLAGS}" },
{ "name": "CMAKE_MSVC_RUNTIME_LIBRARY", "value": "MultiThreaded" },
{ "name": "VCPKG_TARGET_TRIPLET", "value": "arm64-windows-static" }]
},
{
"name": "PROD-Win-x32",
"generator": "Visual Studio 17 2022",
"configurationType": "Release",
"buildRoot": "${workspaceRoot}/.vs/build/${name}",
"installRoot": "${workspaceRoot}/.vs/build/install/${name}",
"inheritEnvironments": [ "msvc_x86_x64" ],
"variables": [{ "name": "CMAKE_CXX_FLAGS_RELEASE", "value": "${env.WIN32_CXX_FLAGS_RELEASE} ${env.WIN32_CXX_FLAGS}" },
{ "name": "CMAKE_EXE_LINKER_FLAGS_RELEASE", "value": "${env.WIN32_EXE_LINKER_FLAGS_RELEASE}" },
{ "name": "CMAKE_MSVC_RUNTIME_LIBRARY", "value": "MultiThreaded" },
{ "name": "VCPKG_TARGET_TRIPLET", "value": "x86-windows-static" }]
},
{
"name": "PROD-Win-x64",
"generator": "Visual Studio 17 2022 Win64",
"configurationType": "Release",
"buildRoot": "${workspaceRoot}/.vs/build/${name}",
"installRoot": "${workspaceRoot}/.vs/build/install/${name}",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": [{ "name": "CMAKE_CXX_FLAGS_RELEASE", "value": "${env.WIN32_CXX_FLAGS_RELEASE} ${env.WIN32_CXX_FLAGS}" },
{ "name": "CMAKE_EXE_LINKER_FLAGS_RELEASE", "value": "${env.WIN32_EXE_LINKER_FLAGS_RELEASE}" },
{ "name": "CMAKE_MSVC_RUNTIME_LIBRARY", "value": "MultiThreaded" },
{ "name": "VCPKG_TARGET_TRIPLET", "value": "x64-windows-static" }]
},
{
"name": "PROD-WSL-ARM32",
"generator": "Unix Makefiles",
"configurationType": "Release",
"wslPath": "${defaultWSLPath}",
"buildRoot": "${workspaceRoot}/.vs/build/${name}",
"installRoot": "${workspaceRoot}/.vs/build/install/${name}",
"intelliSenseMode": "linux-gcc-arm",
"inheritEnvironments": [ "linux_arm" ],
"environments": [{ "CXX": "/usr/bin/arm-linux-gnueabihf-g++-12",
"CC" : "/usr/bin/arm-linux-gnueabihf-gcc-12" }],
"variables": [{ "name": "CMAKE_CXX_FLAGS_RELEASE", "value": "${env.LINUX_CXX_FLAGS} ${env.LINUX_CXX_FLAGS_RELEASE}" },
{ "name": "CMAKE_TOOLCHAIN_FILE", "value": "${env.LINUX_CMAKE_TOOLCHAIN_FILE}" },
{ "name": "VCPKG_TARGET_TRIPLET", "value": "arm-linux" }]
},
{
"name": "PROD-WSL-ARM64",
"generator": "Unix Makefiles",
"configurationType": "Release",
"wslPath": "${defaultWSLPath}",
"buildRoot": "${workspaceRoot}/.vs/build/${name}",
"installRoot": "${workspaceRoot}/.vs/build/install/${name}",
"intelliSenseMode": "linux-gcc-arm",
"inheritEnvironments": [ "linux_arm" ],
"environments": [{ "CXX": "/usr/bin/aarch64-linux-gnu-g++-12",
"CC" : "/usr/bin/aarch64-linux-gnu-gcc-12" }],
"variables": [{ "name": "CMAKE_CXX_FLAGS_RELEASE", "value": "${env.LINUX_CXX_FLAGS} ${env.LINUX_CXX_FLAGS_RELEASE}" },
{ "name": "CMAKE_TOOLCHAIN_FILE", "value": "${env.LINUX_CMAKE_TOOLCHAIN_FILE}" },
{ "name": "VCPKG_TARGET_TRIPLET", "value": "arm64-linux" }]
},
{
"name": "PROD-WSL-x32",
"generator": "Unix Makefiles",
"configurationType": "Release",
"wslPath": "${defaultWSLPath}",
"buildRoot": "${workspaceRoot}/.vs/build/${name}",
"installRoot": "${workspaceRoot}/.vs/build/install/${name}",
"intelliSenseMode": "linux-gcc-x86",
"inheritEnvironments": [ "linux_x86" ],
"environments": [{ "CXX": "/usr/bin/i686-linux-gnu-g++-12",
"CC" : "/usr/bin/i686-linux-gnu-gcc-12" }],
"variables": [{ "name": "CMAKE_CXX_FLAGS_RELEASE", "value": "${env.LINUX_CXX_FLAGS} ${env.LINUX_CXX_FLAGS_RELEASE}" },
{ "name": "CMAKE_TOOLCHAIN_FILE", "value": "${env.LINUX_CMAKE_TOOLCHAIN_FILE}" },
{ "name": "VCPKG_TARGET_TRIPLET", "value": "x86-linux" }]
},
{
"name": "PROD-WSL-x64",
"generator": "Unix Makefiles",
"configurationType": "Release",
"wslPath": "${defaultWSLPath}",
"buildRoot": "${workspaceRoot}/.vs/build/${name}",
"installRoot": "${workspaceRoot}/.vs/build/install/${name}",
"intelliSenseMode": "linux-gcc-x64",
"inheritEnvironments": [ "linux_x64" ],
"environments": [{ "CXX": "/usr/bin/g++-12",
"CC" : "/usr/bin/gcc-12" }],
"variables": [{ "name": "CMAKE_CXX_FLAGS_RELEASE", "value": "${env.LINUX_CXX_FLAGS_RELEASE}" },
{ "name": "CMAKE_TOOLCHAIN_FILE", "value": "${env.LINUX_CMAKE_TOOLCHAIN_FILE}" },
{ "name": "VCPKG_TARGET_TRIPLET", "value": "x64-linux" }]
}
]
}