forked from ryobg/JContainers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_boost.bat
64 lines (50 loc) · 1.41 KB
/
build_boost.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
@echo off
setlocal
set BOOST_ROOT=%~dp0\..\dep\boost
REM Zero the error level
ver > nul
if not exist "%BOOST_ROOT%\bootstrap.bat" (
if not exist "%~dp0\boost.7z" (
echo Download Boost...
python "%~dp0\download.py" ^
https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.7z ^
"%~dp0\boost.7z"
if errorlevel 1 (
echo Unable to download Boost, exiting...
exit /b 1
)
echo Rename Boost folder...
"%~dp0\7za.exe" rn "%~dp0\boost.7z" boost_1_66_0 boost
if errorlevel 1 (
echo Unable to rename Boost, exiting...
exit /b 1
)
)
echo Unpack Boost...
"%~dp0\7za.exe" -aoa -spe x "%~dp0\boost.7z" -o"%BOOST_ROOT%"
if errorlevel 1 (
echo Unable to unpack Boost, exiting...
exit /b 1
)
)
pushd "%BOOST_ROOT%"
if not exist b2.exe (
echo b2 not found, bootstrapping Boost...
call bootstrap.bat
if errorlevel 1 (
echo Unable to bootstrap, exiting...
popd
exit /b 2
)
)
b2 architecture=x86 address-model=64 variant=release,debug ^
link=static runtime-link=static threading=multi ^
--with-serialization --with-date_time --with-filesystem --with-thread ^
--build-dir=garbage --stagedir=boost_lib stage
if errorlevel 1 (
echo Boost build failed, exiting...
popd
exit /b 3
)
REM RMDIR /Q /S garbage
popd