Skip to content

Commit e3378b1

Browse files
committed
Record specified toolset in project-config.jam instead of msvc (boostorg#170)
* Record specified toolset in project-config.jam instead of msvc * Translate toolset names properly; remove outdated messages; set error code on failure
1 parent e54af35 commit e3378b1

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

bootstrap.bat

+20-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
@ECHO OFF
22

3+
SETLOCAL
4+
35
REM Copyright (C) 2009 Vladimir Prus
46
REM
57
REM Distributed under the Boost Software License, Version 1.0.
@@ -34,12 +36,24 @@ goto :bjam_failure
3436
REM Ideally, we should obtain the toolset that build.bat has
3537
REM guessed. However, it uses setlocal at the start and does not
3638
REM export BOOST_JAM_TOOLSET, and I don't know how to do that
37-
REM properly. Default to msvc for now.
38-
set toolset=msvc
39+
REM properly. Default to msvc if not specified.
40+
41+
SET TOOLSET=msvc
42+
43+
IF "%1"=="gcc" SET TOOLSET=gcc
44+
45+
IF "%1"=="vc71" SET TOOLSET=msvc : 7.1
46+
IF "%1"=="vc8" SET TOOLSET=msvc : 8.0
47+
IF "%1"=="vc9" SET TOOLSET=msvc : 9.0
48+
IF "%1"=="vc10" SET TOOLSET=msvc : 10.0
49+
IF "%1"=="vc11" SET TOOLSET=msvc : 11.0
50+
IF "%1"=="vc12" SET TOOLSET=msvc : 12.0
51+
IF "%1"=="vc14" SET TOOLSET=msvc : 14.0
52+
IF "%1"=="vc141" SET TOOLSET=msvc : 14.1
3953

4054
ECHO import option ; > project-config.jam
4155
ECHO. >> project-config.jam
42-
ECHO using %toolset% ; >> project-config.jam
56+
ECHO using %TOOLSET% ; >> project-config.jam
4357
ECHO. >> project-config.jam
4458
ECHO option.set keep-going : false ; >> project-config.jam
4559
ECHO. >> project-config.jam
@@ -60,6 +74,7 @@ ECHO http://boost.org/more/getting_started/windows.html
6074
ECHO.
6175
ECHO - Boost.Build documentation:
6276
ECHO http://www.boost.org/build/doc/html/index.html
77+
ECHO.
6378

6479
goto :end
6580

@@ -69,13 +84,8 @@ ECHO.
6984
ECHO Failed to build Boost.Build engine.
7085
ECHO Please consult bootstrap.log for further diagnostics.
7186
ECHO.
72-
ECHO You can try to obtain a prebuilt binary from
73-
ECHO.
74-
ECHO http://sf.net/project/showfiles.php?group_id=7586^&package_id=72941
75-
ECHO.
76-
ECHO Also, you can file an issue at http://svn.boost.org
77-
ECHO Please attach bootstrap.log in that case.
7887

79-
goto :end
88+
REM Set an error code to allow `bootstrap && b2`
89+
cmd /c exit /b 1 > nul
8090

8191
:end

0 commit comments

Comments
 (0)