-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
mk.bat
37 lines (33 loc) · 745 Bytes
/
mk.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
@echo off
if /i "%1"=="release" (
set mode=Release
set suf=
) else (
set mode=Debug
set suf=d
)
if /i "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
set mode="%mode%|x64"
) else (
set mode="%mode%|Win32"
)
@echo.
@echo ******** Building project(%mode%) ********
@echo.
mkdir bin lib include
devenv cybozulib.sln /Build %mode%
@rem for /F "usebackq" %%p in (`"dir /S /B *.vcproj"`) do devenv %%p /Build %mode%
@echo.
@echo ******** Unit test ********
@echo.
rm -rf result.txt
for %%e in (bin\*_test%suf%.exe) do (%%e | grep "ctest:name") >> result.txt
grep -v "ng=0, exception=0" result.txt
if %ERRORLEVEL% == 0 goto sample
echo "all unit tests are ok"
:sample
@echo.
@echo ******** Run sample ********
@echo.
bin\exception_smpl%suf%.exe
:end