blob: fa6f5ff808b31ad3e54e985969a6b3912c0d0dbd (
plain)
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
|
@echo off
set ARCH=x86
set LOG=OFF
set MODE=%1
if "%MODE%" == "" (
set MODE=Release
)
if not "%MODE%" == "Debug" (
if not "%MODE%" == "Release" (
echo Usage: %0 Debug or Release
goto end
)
)
set LOGLABEL=
if "%LOG%" == "ON" (
set LOGLABEL=_log
) else (
set LOGLABEL=
)
set CMAKE_OPTION=
if "%ARCH%" == "x86" (
set CMAKE_OPTION="Visual Studio 15 2017"
) else if "%ARCH%" == "x64" (
set CMAKE_OPTION="Visual Studio 15 2017 Win64"
)
set DIRNAME=build_%ARCH%%LOGLABEL%
set OUTNAME=%MODE%_%ARCH%%LOGLABEL%
if exist "%DIRNAME%\" (
goto exec_make
)
mkdir %DIRNAME%
cd %DIRNAME%
if "%LOG%" == "ON" (
cmake -G %CMAKE_OPTION% ..
) else (
cmake -G %CMAKE_OPTION% -DNOLOG=1 ..
)
cd ..
:exec_make
cmake --build %DIRNAME% --config %MODE%
:end
echo done.
|