Repository navigation
Expand file tree
/
Copy pathbuild.bat
More file actions
67 lines (57 loc) · 1.36 KB
/
Copy pathbuild.bat
File metadata and controls
67 lines (57 loc) · 1.36 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
@echo off
setlocal
set CMAKE="C:\Program Files\Microsoft Visual Studio\18\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe"
set CONFIG=Release
set GENERATOR=Visual Studio 18 2026
if /i "%1"=="debug" set CONFIG=Debug
if /i "%1"=="clean" (
echo Cleaning build directories...
rmdir /s /q build 2>nul
rmdir /s /q build32 2>nul
echo Done.
exit /b 0
)
if /i "%1"=="32" goto build32
if /i "%1"=="all" goto buildall
goto build64
:build64
if not exist build (
echo Configuring CMake 64-bit...
%CMAKE% -B build -G "%GENERATOR%" -A x64
if errorlevel 1 (
echo CMake configure failed.
exit /b 1
)
)
echo Building 64-bit %CONFIG%...
%CMAKE% --build build --config %CONFIG% -- /m
if errorlevel 1 (
echo Build failed.
exit /b 1
)
echo.
echo Output: build\bin\%CONFIG%\relimiter.addon64
if /i "%1"=="all" goto build32
exit /b 0
:build32
if not exist build32 (
echo Configuring CMake 32-bit...
%CMAKE% -B build32 -G "%GENERATOR%" -A Win32
if errorlevel 1 (
echo CMake configure failed, 32-bit.
exit /b 1
)
)
echo Building 32-bit %CONFIG%...
%CMAKE% --build build32 --config %CONFIG% -- /m
if errorlevel 1 (
echo Build failed, 32-bit.
exit /b 1
)
echo.
echo Output: build32\bin\%CONFIG%\relimiter.addon32
exit /b 0
:buildall
call :build64
if errorlevel 1 exit /b 1
goto build32