• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1@ECHO OFF
2
3SETLOCAL
4
5REM Copyright 2019 Rene Rivera
6REM Copyright (C) 2009 Vladimir Prus
7REM
8REM Distributed under the Boost Software License, Version 1.0.
9REM (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
10
11ECHO Building Boost.Build engine
12if exist ".\tools\build\src\engine\b2.exe" del tools\build\src\engine\b2.exe
13pushd tools\build\src\engine
14
15call .\build.bat %* > ..\..\..\..\bootstrap.log
16@ECHO OFF
17
18popd
19
20if exist ".\tools\build\src\engine\b2.exe" (
21   copy .\tools\build\src\engine\b2.exe . > nul
22   goto :bjam_built)
23
24goto :bjam_failure
25
26:bjam_built
27
28REM Ideally, we should obtain the toolset that build.bat has
29REM guessed. However, it uses setlocal at the start and does not
30REM export BOOST_JAM_TOOLSET, and I don't know how to do that
31REM properly. Default to msvc if not specified.
32
33SET TOOLSET=msvc
34
35IF "%1"=="gcc" SET TOOLSET=gcc
36
37IF "%1"=="vc71" SET TOOLSET=msvc : 7.1
38IF "%1"=="vc8" SET TOOLSET=msvc : 8.0
39IF "%1"=="vc9" SET TOOLSET=msvc : 9.0
40IF "%1"=="vc10" SET TOOLSET=msvc : 10.0
41IF "%1"=="vc11" SET TOOLSET=msvc : 11.0
42IF "%1"=="vc12" SET TOOLSET=msvc : 12.0
43IF "%1"=="vc14" SET TOOLSET=msvc : 14.0
44IF "%1"=="vc141" SET TOOLSET=msvc : 14.1
45IF "%1"=="vc142" SET TOOLSET=msvc : 14.2
46
47ECHO.
48ECHO Generating Boost.Build configuration in project-config.jam for %TOOLSET%...
49ECHO # Boost.Build Configuration > project-config.jam
50ECHO # Automatically generated by bootstrap.bat >> project-config.jam
51ECHO. >> project-config.jam
52ECHO import option ; >> project-config.jam
53ECHO. >> project-config.jam
54ECHO using %TOOLSET% ; >> project-config.jam
55ECHO. >> project-config.jam
56ECHO option.set keep-going : false ; >> project-config.jam
57ECHO. >> project-config.jam
58
59ECHO.
60ECHO Bootstrapping is done. To build, run:
61ECHO.
62ECHO     .\b2
63ECHO.
64
65IF EXIST libs\config\include (
66ECHO.    To generate header files, run:
67ECHO.
68ECHO.    .\b2 headers
69ECHO.
70)
71
72ECHO To adjust configuration, edit 'project-config.jam'.
73ECHO Further information:
74ECHO.
75ECHO     - Command line help:
76ECHO     .\b2 --help
77ECHO.
78ECHO     - Getting started guide:
79ECHO     http://boost.org/more/getting_started/windows.html
80ECHO.
81ECHO     - Boost.Build documentation:
82ECHO     http://www.boost.org/build/
83ECHO.
84
85goto :end
86
87:bjam_failure
88
89ECHO.
90ECHO Failed to build Boost.Build engine.
91ECHO Please consult bootstrap.log for further diagnostics.
92ECHO.
93
94REM Set an error code to allow `bootstrap && b2`
95cmd /c exit /b 1 > nul
96
97:end
98