-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDefaultUserConfig.yaml
More file actions
324 lines (291 loc) · 13 KB
/
Copy pathDefaultUserConfig.yaml
File metadata and controls
324 lines (291 loc) · 13 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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# List of anchors that will be aliased later
Templates:
MSVC_CompileFlags: &MSVC_CompileFlags
Flags: "/NOLOGO /W4 /diagnostics:caret /D NDEBUG /utf-8 /Gm- /MD /EHa /TP /std:c++17 /GR /TP"
"g++_CompileRunParts": &g++_CompileRunParts
- Type: Once
CommandPart: "{Executable} -c {CompileFlags}"
- Type: Repeats
CommandPart: " -D{DefineNameOnly}="
- Type: Repeats
CommandPart: " \"-D{DefineName}={DefineValue}\""
- Type: Repeats
CommandPart: " -I\"{IncludeDirectoryPath}\""
- Type: Once
CommandPart: " \"{InputFilePath}\" -o \"{OutputFilePath}\""
"g++_LinkRunParts": &g++_LinkRunParts
- Type: Once
CommandPart: "{Executable} {LinkFlags} -o \"{OutputFilePath}\""
- Type: Repeats
CommandPart: " \"{LinkFilePath}\""
"vs2022_v17+_CompileRunParts": &vs2022_v17+_CompileRunParts
- Type: Once
CommandPart: "{Executable} /c {CompileFlags}"
- Type: Repeats
CommandPart: " /D{DefineNameOnly}="
- Type: Repeats
CommandPart: " \"/D{DefineName}={DefineValue}\""
- Type: Repeats
CommandPart: " /I\"{IncludeDirectoryPath}\""
- Type: Once
CommandPart: " /Fo\"{OutputFilePath}\" \"{InputFilePath}\""
"vs2022_v17+_LinkRunParts": &vs2022_v17+_LinkRunParts
- Type: Once
CommandPart: "{Executable} {LinkFlags} /OUT:\"{OutputFilePath}\""
- Type: Repeats
CommandPart: " \"{LinkFilePath}\""
# The following fields set the prefixes and extensions for each type of the files
# If the name of an object files are libtest.so and libtest2.so,
# the prefixes and extensions are "lib" and ".so"
# TODO: Add support for custom platform
# Each of the platform dependent settings can be listed under
# - Default
# - Windows
# - Linux
# - MacOS
# - Unix
FilesTypes: &CommonFilesTypes
ObjectLinkFile:
Prefix:
Default: ""
Extension:
Windows: ".obj"
Unix: ".o"
# The file properties for the files to be **linked** as shared libraries for each platform
SharedLinkFile:
Prefix:
Windows: ""
Linux: "lib"
MacOS: ""
Extension:
Windows: ".lib"
Linux: ".so"
MacOS: ".dylib"
# The file properties for the files to be **copied** as shared libraries for each platform
SharedLibraryFile:
Prefix:
Windows: ""
Linux: "lib"
MacOS: ""
Extension:
Windows: ".dll"
Linux: ".so"
MacOS: ".dylib"
# The file properties for the files to be linked as static libraries for each platform
StaticLinkFile:
Prefix:
Unix: "lib"
Windows: ""
Extension:
Windows: ".lib"
Unix: ".a"
# (Optional) The file properties for debug symbols to be copied alongside the binary
# for each platform
DebugSymbolFile:
Prefix:
Windows: ""
Unix: ""
Extension:
Windows: ""
Unix: ""
# WARNING: All command substitutions in this file are passed directly to the shell.
# Exercise caution when using variables or user-provided input in your build commands
# to prevent potential security vulnerabilities.
# A profile to be used if not specified while running the build script
PreferredProfile: "g++"
# List of compiler/linker profiles that instruct how to compile/link
Profiles:
# Name (case sensitive) of the profile that can be queried from a script
- Name: "g++"
# (Optional) Name aliases (case sensitive) of the current profile
NameAliases: ["mingw"]
# The file extensions associated with the profile
FileExtensions: [.cpp, .cc, .cxx]
# The languages supported by the profile
Languages: ["c++"]
# (Optional) The commands to run in **shell** before calling the compiler/linker for each platform.
# This is run inside the .runcpp2 directory where the build happens.
# Setup:
# Default: []
# (Optional) The commands to run in **shell** after calling the compiler/linker for each platform.
# This is run inside the .runcpp2 directory where the build happens.
# Cleanup:
# Default: []
# The file properties for the object files for each platform.
FilesTypes: *CommonFilesTypes
# Specify the compiler settings
Compiler:
# (Optional) The command to run together before running each compile command
# in **shell** for each platform
# PreRun:
# Default: ""
# Shell command to use for checking if the executable exists or not
CheckExistence:
Default: "g++ -v"
# Here are a list of substitution strings for RunParts, Setup and Cleanup
# {Executable}: Compiler executable
# {CompileFlags}: Compile flags from config and override
# {IncludeDirectoryPath}: Path to include directories for both the script and dependencies
# {DefineNameOnly}: Name of a macro to be defined without a value (equivalent to #define X)
# {DefineName}: Name of a macro to be defined with a value
# {DefineValue}: Value of a macro to be defined (used with {DefineName})
# {InputFileName}: Name of the input file (without directory path and extension)
# {InputFileExtension}: Extension of the input file
# {InputFileDirectory}: Directory of the input file
# {InputFilePath}: Full path to the input file
# {OutputFileName}: Name of the output (object) file (without directory path and extension)
# {OutputFileExtension}: (Similar to previous)
# {OutputFileDirectory}: (Similar to previous)
# {OutputFilePath}: (Similar to previous)
CompileTypes:
Executable:
Default:
Flags: "-std=c++17 -Wall -g"
Executable: "g++"
RunParts: *g++_CompileRunParts
# (Optional) The commands to run in **shell** BEFORE compiling
# This is run inside the .runcpp2 directory where the build happens.
# Setup: []
# (Optional) The commands to run in **shell** AFTER compiling
# This is run inside the .runcpp2 directory where the build happens.
# Cleanup: []
Static:
Default:
Flags: "-std=c++17 -Wall -g"
Executable: "g++"
RunParts: *g++_CompileRunParts
# Setup: []
# Cleanup: []
Shared:
Default:
Flags: "-std=c++17 -Wall -g -fpic"
Executable: "g++"
RunParts: *g++_CompileRunParts
# Setup: []
# Cleanup: []
# Specify the linker settings
Linker:
# (Optional) The command to run together before running each link command
# in **shell** for each platform
# PreRun:
# Default: ""
# Shell command to use for checking if the executable exists or not
CheckExistence:
Default: "g++ -v"
# Here are a list of substitution strings for RunParts, Setup and Cleanup
# {Executable}: Linker executable
# {LinkFlags}: Link flags from config and override
# {LinkFileName}: Name of the file to be linked. Any files we are linking will be substituted
# {LinkFileExtension}: (Similar to previous)
# {LinkFileDirectory}: (Similar to previous)
# {LinkFilePath}: (Similar to previous)
# {LinkObjectFileName}: Name of the object file to be linked. Only object file will be substituted
# {LinkObjectFileExtension}: (Similar to previous)
# {LinkObjectFileDirectory}: (Similar to previous)
# {LinkObjectFilePath}: (Similar to previous)
# {LinkSharedFileName}: (Similar to previous)
# {LinkSharedFileExtension}: (Similar to previous)
# {LinkSharedFileDirectory}: (Similar to previous)
# {LinkSharedFilePath}: (Similar to previous)
# {LinkStaticFileName}: (Similar to previous)
# {LinkStaticFileExtension}: (Similar to previous)
# {LinkStaticFileDirectory}: (Similar to previous)
# {LinkStaticFilePath}: (Similar to previous)
# {OutputFileName}: (Similar to previous)
# {OutputFileExtension}: (Similar to previous)
# {OutputFileDirectory}: (Similar to previous)
# {OutputFilePath}: (Similar to previous)
LinkTypes:
Executable:
Unix:
Flags: "-Wl,-rpath,\\$ORIGIN"
Executable: "g++"
RunParts: *g++_LinkRunParts
# Setup: []
# Cleanup: []
Windows:
Flags: "-Wl,-rpath,$ORIGIN"
Executable: "g++"
RunParts: *g++_LinkRunParts
# Setup: []
# Cleanup: []
Static:
Default:
Flags: ""
Executable: "g++"
RunParts: *g++_LinkRunParts
# Setup: []
# Cleanup: []
Shared:
Unix:
Flags: "-shared -Wl,-rpath,\\$ORIGIN"
Executable: "g++"
RunParts: *g++_LinkRunParts
# Setup: []
# Cleanup: []
Windows:
Flags: "-shared -Wl,-rpath,$ORIGIN"
Executable: "g++"
RunParts: *g++_LinkRunParts
# Setup: []
# Cleanup: []
# https://learn.microsoft.com/en-us/cpp/overview/compiler-versions?view=msvc-170
- Name: "vs2022_v17+"
NameAliases: ["msvc1930+", "msvc"]
Languages: ["c++"]
FileExtensions: [.cpp, .cc, .cxx]
FilesTypes: *CommonFilesTypes
Compiler:
PreRun:
Windows: "\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat\" x64"
CheckExistence:
Windows: "where.exe CL.exe"
CompileTypes:
Executable:
Windows:
<<: *MSVC_CompileFlags
Executable: "CL.exe"
RunParts: *vs2022_v17+_CompileRunParts
Static:
Windows:
<<: *MSVC_CompileFlags
Executable: "CL.exe"
RunParts: *vs2022_v17+_CompileRunParts
Shared:
Windows:
<<: *MSVC_CompileFlags
Executable: "CL.exe"
RunParts: *vs2022_v17+_CompileRunParts
# Specify the linker settings
Linker:
PreRun:
Windows: "\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat\" x64"
CheckExistence:
Windows: "where.exe link.exe"
LinkTypes:
Executable:
Windows:
Flags: >-
/NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /manifest:embed /SUBSYSTEM:CONSOLE
Executable: "link.exe"
RunParts: *vs2022_v17+_LinkRunParts
Static:
Windows:
Flags: "/NOLOGO"
Executable: "lib.exe"
RunParts: *vs2022_v17+_LinkRunParts
Shared:
Windows:
Flags: >-
/NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /manifest:embed /SUBSYSTEM:CONSOLE
/DLL
Executable: "link.exe"
RunParts:
- Type: Once
CommandPart: "{Executable} {LinkFlags} /OUT:\"{OutputFilePath}\" /DEF:\".\\temp.def\""
- Type: Repeats
CommandPart: " \"{LinkFilePath}\""
Setup: [ "echo EXPORTS > .\\temp.def", "echo. main @1 >> .\\temp.def" ]
Cleanup: [ "del .\\temp.def" ]