forked from BehroozAbbassi/sdkffi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
msvc-build-rel.cmd
55 lines (41 loc) · 1.07 KB
/
msvc-build-rel.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
45
46
47
48
49
50
51
52
53
54
55
@echo off
setlocal enableextensions enabledelayedexpansion
set msbuildemitsolution=1
set vswhere="!ProgramFiles(x86)!\Microsoft Visual Studio\Installer\vswhere.exe"
set vcvarsall_path=""
for /f "tokens=*" %%i in ('!vswhere! -property installationPath') do (
if exist "%%i\VC\Auxiliary\Build\vcvarsall.bat" (
echo.
echo vcvarsall.bat found : %%i
echo.
set "vcvarsall_path="%%i\VC\Auxiliary\Build\vcvarsall.bat""
)
)
if !vcvarsall_path! == "" (
echo.
echo Error, could not find vcvarsall.bat
echo.
endlocal
exit /b 1
)
@rem call MSVC Developer Command Prompt
call !vcvarsall_path! x86_amd64
@rem build all solutions in the current directory
for %%f in (*.sln) do (
echo.
echo Start building [%%~nxf]
echo.
msbuild.exe %%~nxf /t:Build /p:Configuration=Release;Platform=x64 -m /p:PlatformToolset="v142"
if %errorlevel% == 0 (
echo.
echo The solution [%%~nxf] built successfully!
echo.
) else (
echo.
echo Error
echo.
)
)
endlocal
pause
exit /b 0