-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.bat
104 lines (95 loc) · 1.59 KB
/
make.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
@echo off
set "do_configure=0"
set "do_build=0"
set "do_run=0"
set "do_release=0"
if "%1" == "-c" (
set "do_configure=1"
)
if "%2" == "-c" (
set "do_configure=1"
)
if "%3" == "-c" (
set "do_configure=1"
)
if "%4" == "-c" (
set "do_configure=1"
)
if "%1" == "-b" (
set "do_build=1"
)
if "%2" == "-b" (
set "do_build=1"
)
if "%3" == "-b" (
set "do_build=1"
)
if "%4" == "-b" (
set "do_build=1"
)
if "%1" == "-r" (
set "do_run=1"
)
if "%2" == "-r" (
set "do_run=1"
)
if "%3" == "-r" (
set "do_run=1"
)
if "%4" == "-r" (
set "do_run=1"
)
if "%1" == "-R" (
set "do_release=1"
)
if "%2" == "-R" (
set "do_release=1"
)
if "%3" == "-R" (
set "do_release=1"
)
if "%4" == "-R" (
set "do_release=1"
)
if "%1" == "-a" (
set "do_configure=1"
set "do_build=1"
set "do_run=1"
)
if "%2" == "-a" (
set "do_configure=1"
set "do_build=1"
set "do_run=1"
)
if "%3" == "-a" (
set "do_configure=1"
set "do_build=1"
set "do_run=1"
set "do_release=1"
)
if %do_configure% == 1 (
echo configuring...
cmake -S ./ -B ./build -Dbuild_src=ON --log-level=VERBOSE || goto :error
echo configuring - DONE
)
if %do_build% == 1 (
echo building...
if %do_release% == 1 (
MSBuild.exe ./build/neural-network.sln /p:configuration=release || goto :error
) else (
MSBuild.exe ./build/neural-network.sln /p:configuration=debug || goto :error
)
echo building - DONE
)
if %do_run% == 1 (
echo running...
if %do_release% == 1 (
"build/Release/neural-network.exe" || goto :error
) else (
"build/Debug/neural-network.exe" || goto :error
)
)
goto :EOF
:error
echo Failed with error: #%errorlevel%.
exit /b %errorlevel%