This repository has been archived by the owner on Jun 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBuild.cmd
44 lines (29 loc) · 1.51 KB
/
Build.cmd
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
@echo off
setlocal
set BuiltInVsWhereExe="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if not defined ProgramFiles(x86) ( set "BuiltInVsWhereExe="%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe"" )
if not exist %BuiltInVsWhereExe% (echo 请安装VS2017或者更高版本然后继续!& goto:eof )
for /f "tokens=*" %%i in ('%BuiltInVsWhereExe% -latest -prerelease -property installationPath') do ( set LatestVisualStudioRoot=%%i)
pushd "%~dp0"
md "%~dp0objs"
setlocal
call "%LatestVisualStudioRoot%\VC\Auxiliary\Build\vcvarsamd64_x86.bat"
md "%~dp0objs\%Platform%"
cl /O1 /Os /Oi /GS- /arch:IA32 /Z7 /MT /Fo"objs\%Platform%\CRT_parameter_handler_Thunks.obj" /Zl /c /D "NDEBUG" "%~dp0src\CRT_parameter_handler_Thunks.cpp"
endlocal
setlocal
call "%LatestVisualStudioRoot%\VC\Auxiliary\Build\vcvars64.bat"
md "%~dp0objs\%Platform%"
cl /O1 /Os /Oi /GS- /Z7 /MT /Fo"objs\%Platform%\CRT_parameter_handler_Thunks.obj" /Zl /c /D "NDEBUG" "%~dp0src\CRT_parameter_handler_Thunks.cpp"
endlocal
setlocal
call "%LatestVisualStudioRoot%\VC\Auxiliary\Build\vcvarsamd64_arm.bat"
md "%~dp0objs\%Platform%"
cl /O1 /Os /Oi /GS- /Z7 /MT /Fo"objs\%Platform%\CRT_parameter_handler_Thunks.obj" /Zl /c /D "NDEBUG" "%~dp0src\CRT_parameter_handler_Thunks.cpp"
endlocal
setlocal
call "%LatestVisualStudioRoot%\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
md "%~dp0objs\%Platform%"
cl /O1 /Os /Oi /GS- /Z7 /MT /Fo"objs\%Platform%\CRT_parameter_handler_Thunks.obj" /Zl /c /D "NDEBUG" "%~dp0src\CRT_parameter_handler_Thunks.cpp"
endlocal
goto:eof