forked from TrenchBroom/TrenchBroom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CI-windows.bat
60 lines (41 loc) · 1.21 KB
/
CI-windows.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
REM Check versions
qmake -v
cmake --version
pandoc --version
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
mkdir cmakebuild
cd cmakebuild
REM Treat warnings as errors
REM Don't pass -DCMAKE_CXX_FLAGS="/WX" on the cmake command line; doing so wipes out necessary cmake-provided defaults such as "/EHsc"
set CXXFLAGS="/WX"
cmake .. -G"Visual Studio 17 2022" -T v143 -A "%TB_ARCH%" -DCMAKE_PREFIX_PATH="%QT5_INSTALL_DIR%" -DCMAKE_BUILD_TYPE=Release -DTB_SUPPRESS_PCH=1
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
cmake --build . --config Release
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
set BUILD_DIR="%cd%"
cd lib\vm\test\Release
vm-test.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
cd "%BUILD_DIR%"
cd lib\kdl\test\Release
kdl-test.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
cd "%BUILD_DIR%"
cd common\test\Release
common-test.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
common-regression-test.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
cd "%BUILD_DIR%"
cd common\benchmark\Release
common-benchmark.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
cd "%BUILD_DIR%"
"C:\Program Files\CMake\bin\cpack.exe"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
call generate_checksum.bat
GOTO END
:ERROR
echo "Building TrenchBroom failed"
exit /b 1
:END