@@ -6,20 +6,18 @@ PreferredProfile: "g++"
66
77# List of compiler/linker profiles that instruct how to compile/link
88Profiles :
9+ # Name (case sensitive) of the profile that can be queried from a script
910- Name : " g++"
1011
12+ # (Optional) Name aliases (case sensitive) of the current profile
13+ NameAliases : ["mingw"]
14+
1115 # The file extensions associated with the profile
1216 FileExtensions : [cpp, cc, cxx]
1317
1418 # The languages supported by the profile
1519 Languages : ["c++"]
1620
17- # (Optional) Steps to run before calling the compiler/linker.
18- # This is run inside the .runcpp2 directory where the build happens.
19- # SetupSteps:
20- # # Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
21- # All: []
22-
2321 # The following fields set the prefixes and extensions for each type of the files
2422 # If the name of an object files are libtest.so and libtest2.so,
2523 # the prefixes and extensions are "lib" and ".so"
@@ -31,6 +29,12 @@ Profiles:
3129 # - MacOS
3230 # - Unix
3331
32+ # (Optional) The commands to run in **shell** before calling the compiler/linker for each platform.
33+ # This is run inside the .runcpp2 directory where the build happens.
34+ # SetupSteps:
35+ # All: []
36+
37+ # TODO: Make this common
3438 # The file properties for the object files for each platform.
3539 ObjectLinkFile :
3640 Prefix :
@@ -90,6 +94,9 @@ Profiles:
9094 # Executable to be called
9195 Executable : " g++"
9296
97+ # Shell command to use for checking if the executable exists or not
98+ CheckExistence : " g++ -v"
99+
93100 # Default arguments to provide for compilation which can be overridden
94101 # by the script for each platform
95102 DefaultCompileFlags :
@@ -134,6 +141,9 @@ Profiles:
134141 # Executable to be called
135142 Executable : " g++"
136143
144+ # Shell command to use for checking if the executable exists or not
145+ CheckExistence : " g++ -v"
146+
137147 # Default arguments to provide for linking dependencies to the binary,
138148 # which can be overridden by the script for each platform
139149 DefaultLinkFlags :
@@ -164,3 +174,91 @@ Profiles:
164174 # {LinkFilePath} will be replaced by the path to the object file
165175 # we are linking against
166176 LinkPart : " {LinkFilePath}"
177+
178+ # https://learn.microsoft.com/en-us/cpp/overview/compiler-versions?view=msvc-170
179+ - &MSVC_2022
180+ Name : " vs2022_v17+"
181+ NameAliases : ["msvc1930+", "msvc"]
182+ FileExtensions : [cpp, cc, cxx]
183+ Languages : ["c++"]
184+
185+ ObjectLinkFile :
186+ Prefix :
187+ Windows : " "
188+ Extension :
189+ Windows : " .obj"
190+
191+ SharedLinkFile :
192+ Prefix :
193+ Windows : " "
194+ Extension :
195+ Windows : " .lib"
196+
197+ SharedLibraryFile :
198+ Prefix :
199+ Windows : " "
200+ Extension :
201+ Windows : " .dll"
202+
203+ StaticLinkFile :
204+ Prefix :
205+ Windows : " "
206+ Extension :
207+ Windows : " .lib"
208+
209+ DebugSymbolFile :
210+ Prefix :
211+ Windows : " "
212+ Extension :
213+ Windows : " .pdb"
214+
215+ Compiler :
216+ EnvironmentSetup :
217+ Windows : " \" C:\\ Program Files\\ Microsoft Visual Studio\\ 2022\\ Community\\ VC\\ Auxiliary\\ Build\\ vcvarsall.bat\" x64"
218+
219+ Executable : " CL.exe"
220+
221+ CheckExistence : " where.exe CL.exe"
222+
223+ DefaultCompileFlags :
224+ Windows : " /utf-8 /MD /EHa /TP"
225+
226+ ExecutableCompileFlags :
227+ Windows : " "
228+
229+ StaticLibCompileFlags :
230+ Windows : " "
231+
232+ SharedLibCompileFlags :
233+ Windows : " "
234+
235+ # Should be: CL.exe /c {CompileFlags} /I{IncludeDirectoryPath} /Fo"{ObjectFilePath}" {InputFilePath}
236+ CompileArgs :
237+ CompilePart : " /c {CompileFlags}"
238+ IncludePart : " /I{IncludeDirectoryPath}"
239+ InputPart : " {InputFilePath}"
240+ OutputPart : " /Fo\" {ObjectFilePath}\" "
241+
242+ Linker :
243+ EnvironmentSetup :
244+ Windows : " \" C:\\ Program Files\\ Microsoft Visual Studio\\ 2022\\ Community\\ VC\\ Auxiliary\\ Build\\ vcvarsall.bat\" x64"
245+
246+ Executable : " link.exe"
247+
248+ CheckExistence : " where.exe link.exe"
249+
250+ DefaultLinkFlags :
251+ Windows : " "
252+
253+ ExecutableLinkFlags :
254+ Windows : " "
255+
256+ StaticLibLinkFlags :
257+ Windows : " "
258+
259+ SharedLibLinkFlags :
260+ Windows : " "
261+
262+ LinkArgs :
263+ OutputPart : " {LinkFlags} -o {OutputFilePath}"
264+ LinkPart : " {LinkFilePath}"
0 commit comments