-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild-all-configs.bat
64 lines (50 loc) · 1.69 KB
/
build-all-configs.bat
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
echo on
rem change the following if your Visual Studio is installed somewhere else.
set VSROOTDIR="C:\Program Files\Microsoft Visual Studio"
rem execute in bat's directory
pushd %~dp0
call %VSROOTDIR%"\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
if errorlevel 1 goto fail_vc_x64
echo on
cmake -G Ninja -B out/build/x64-Debug -DCMAKE_BUILD_TYPE=Debug
if errorlevel 1 goto fail_cmake
cmake --build out/build/x64-Debug
rem KLUDGE: builds sometimes fail for non-obvious reasons
if errorlevel 1 cmake --build out/build/x64-Debug
if errorlevel 1 goto fail_build
cmake -G Ninja -B out/build/x64-Release -DCMAKE_BUILD_TYPE=RelWithDebInfo
if errorlevel 1 goto fail_cmake
cmake --build out/build/x64-Release
rem KLUDGE: builds sometimes fail for non-obvious reasons
if errorlevel 1 cmake --build out/build/x64-Release
if errorlevel 1 goto fail_build
call %VSROOTDIR%"\2022\Community\VC\Auxiliary\Build\vcvars32.bat"
if errorlevel 1 goto fail_vc_x86
echo on
cmake -G Ninja -B out/build/x86-Debug -DCMAKE_BUILD_TYPE=Debug
if errorlevel 1 goto fail_cmake
cmake --build out/build/x86-Debug
rem KLUDGE: builds sometimes fail for non-obvious reasons
if errorlevel 1 cmake --build out/build/x86-Debug
if errorlevel 1 goto fail_build
cmake -G Ninja -B out/build/x86-Release -DCMAKE_BUILD_TYPE=RelWithDebInfo
if errorlevel 1 goto fail_cmake
cmake --build out/build/x86-Release
rem KLUDGE: builds sometimes fail for non-obvious reasons
if errorlevel 1 cmake --build out/build/x86-Release
if errorlevel 1 goto fail_build
goto done
:fail_vc_x64
echo vcvars64.bat not found
goto done
:fail_vc_x86
echo vcvars32.bat not found
goto done
:fail_cmake
echo cmake failed
goto done
:fail_build
echo cmake --build failed
goto done
:done
popd