-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuild.bat
More file actions
49 lines (41 loc) · 1 KB
/
Copy pathBuild.bat
File metadata and controls
49 lines (41 loc) · 1 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
@echo off
REM default options
set USE_SSE=ON
set BUILD_TESTS=ON
set BUILD_PLAYGROUND=ON
set CMAKE_GENERATOR=Visual Studio 17 2022
set CMAKE_ARCH=x64
if exist BuildConfig.cfg (
echo Using BuildConfig.cfg
REM call BuildConfig.cfg
for /F "usebackq tokens=1,2 delims== eol=#" %%A in ("BuildConfig.cfg") do (
set %%A=%%B
)
echo Generating build with:
) else (
echo No Build Config
echo Generating build with default:
)
echo.
echo USE_SSE = %USE_SSE%
echo BUILD_TESTS = %BUILD_TESTS%
echo BUILD_PLAYGROUND = %BUILD_PLAYGROUND%
echo CMAKE_GENERATOR = %CMAKE_GENERATOR%
echo CMAKE_ARCH = %CMAKE_ARCH%
echo.
if "%CMAKE_GENERATOR%"=="Visual Studio 17 2022" (
echo Using VS 2022
) else if "%CMAKE_GENERATOR%"=="Visual Studio 16 2019" (
echo Using VS 2019
) else (
echo WARNING: Unknown generator %CMAKE_GENERATOR%
)
echo.
cmake -S . -B Build ^
-DUSE_SSE=%USE_SSE% ^
-DBUILD_TESTS=%BUILD_TESTS% ^
-DBUILD_PLAYGROUND=%BUILD_PLAYGROUND% ^
-G "%CMAKE_GENERATOR%" -A %CMAKE_ARCH%
echo.
echo Build Completed.
pause