Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix toolset version for VS2017 (should be 14.1) #167

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/engine/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ECHO ### You can specify the toolset as the argument, i.e.:
ECHO ### .\build.bat msvc
ECHO ###
ECHO ### Toolsets supported by this script are: borland, como, gcc, gcc-nocygwin,
ECHO ### intel-win32, metrowerks, mingw, msvc, vc7, vc8, vc9, vc10, vc11, vc12, vc14, vc15
ECHO ### intel-win32, metrowerks, mingw, msvc, vc7, vc8, vc9, vc10, vc11, vc12, vc14, vc141
ECHO ###
call :Set_Error
endlocal
Expand Down Expand Up @@ -102,22 +102,22 @@ if not errorlevel 1 set ProgramFiles=C:\Program Files

call :Clear_Error
if NOT "_%VS150COMNTOOLS%_" == "__" (
set "BOOST_JAM_TOOLSET=vc15"
set "BOOST_JAM_TOOLSET=vc141"
set "BOOST_JAM_TOOLSET_ROOT=%VS150COMNTOOLS%..\..\VC\"
goto :eof)
call :Clear_Error
if EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" (
set "BOOST_JAM_TOOLSET=vc15"
set "BOOST_JAM_TOOLSET=vc141"
set "BOOST_JAM_TOOLSET_ROOT=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\VC\"
goto :eof)
call :Clear_Error
if EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat" (
set "BOOST_JAM_TOOLSET=vc15"
set "BOOST_JAM_TOOLSET=vc141"
set "BOOST_JAM_TOOLSET_ROOT=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\VC\"
goto :eof)
call :Clear_Error
if EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" (
set "BOOST_JAM_TOOLSET=vc15"
set "BOOST_JAM_TOOLSET=vc141"
set "BOOST_JAM_TOOLSET_ROOT=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\"
goto :eof)
call :Clear_Error
Expand Down Expand Up @@ -466,12 +466,12 @@ set "BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0"
set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
set "_known_=1"
:Skip_VC14
if NOT "_%BOOST_JAM_TOOLSET%_" == "_vc15_" goto Skip_VC15
if NOT "_%BOOST_JAM_TOOLSET%_" == "_vc141_" goto Skip_VC141
if NOT "_%VS150COMNTOOLS%_" == "__" (
set "BOOST_JAM_TOOLSET_ROOT=%VS150COMNTOOLS%..\..\VC\"
)

REM vc15 vsvarsall requires the architecture as a parameter.
REM vc141 vsvarsall requires the architecture as a parameter.
set BOOST_JAM_ARCH=x86
if NOT "_%PROCESSOR_ARCHITECTURE%_" == "__" set BOOST_JAM_ARCH=%PROCESSOR_ARCHITECTURE%
if NOT "_%Platform%_" == "__" set BOOST_JAM_ARCH=%Platform%
Expand All @@ -487,7 +487,7 @@ set "BOOST_JAM_OPT_JAM=/Febootstrap\jam0"
set "BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0"
set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
set "_known_=1"
:Skip_VC15
:Skip_VC141
if NOT "_%BOOST_JAM_TOOLSET%_" == "_borland_" goto Skip_BORLAND
if "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
call :Test_Path bcc32.exe )
Expand Down
2 changes: 1 addition & 1 deletion src/engine/build.jam
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ toolset vc14 cl : /Fe /Fe /Fd /Fo : -D
-I$(--python-include) -I$(--extra-include)
: kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
## Microsoft Visual C++ 2017
toolset vc15 cl : /Fe /Fe /Fd /Fo : -D
toolset vc141 cl : /Fe /Fe /Fd /Fo : -D
: /nologo
[ opt --release : /GL /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
[ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
Expand Down
9 changes: 4 additions & 5 deletions src/tools/msvc.jam
Original file line number Diff line number Diff line change
Expand Up @@ -907,9 +907,9 @@ local rule configure-really ( version ? : options * )
# version from the path.
# FIXME: We currently detect both Microsoft Visual Studio 9.0 and
# 9.0express as 9.0 here.
if [ MATCH "(Microsoft Visual Studio 15)" : $(command) ]
if [ MATCH "(Microsoft Visual Studio[\/\\]2017)" : $(command) ]
{
version = 15.0 ;
version = 14.1 ;
}
else if [ MATCH "(Microsoft Visual Studio 14)" : $(command) ]
{
Expand Down Expand Up @@ -1595,7 +1595,7 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
armv7 armv7s ;

# Known toolset versions, in order of preference.
.known-versions = 15.0 14.0 12.0 11.0 10.0 10.0express 9.0 9.0express 8.0 8.0express 7.1
.known-versions = 14.1 14.0 12.0 11.0 10.0 10.0express 9.0 9.0express 8.0 8.0express 7.1
7.1toolkit 7.0 6.0 ;

# Version aliases.
Expand All @@ -1608,7 +1608,7 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
.version-alias-11 = 11.0 ;
.version-alias-12 = 12.0 ;
.version-alias-14 = 14.0 ;
.version-alias-15 = 15.0 ;
.version-alias-14.1 = 14.1 ;

# Names of registry keys containing the Visual C++ installation path (relative
# to "HKEY_LOCAL_MACHINE\SOFTWARE\\Microsoft").
Expand All @@ -1624,7 +1624,6 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
.version-11.0-reg = "VisualStudio\\11.0\\Setup\\VC" ;
.version-12.0-reg = "VisualStudio\\12.0\\Setup\\VC" ;
.version-14.0-reg = "VisualStudio\\14.0\\Setup\\VC" ;
.version-15.0-reg = "VisualStudio\\15.0\\Setup\\VC" ;

# Visual C++ Toolkit 2003 does not store its installation path in the registry.
# The environment variable 'VCToolkitInstallDir' and the default installation
Expand Down
7 changes: 3 additions & 4 deletions src/tools/msvc.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ def configure_really(version=None, options=[]):
# FIXME: We currently detect both Microsoft Visual Studio 9.0 and
# 9.0express as 9.0 here.
if re.search("Microsoft Visual Studio[\/\\]2017", command):
version = '15.0'
version = '14.1'
elif re.search("Microsoft Visual Studio 14", command):
version = '14.0'
elif re.search("Microsoft Visual Studio 12", command):
Expand Down Expand Up @@ -1265,7 +1265,7 @@ def first(self):


# Known toolset versions, in order of preference.
_known_versions = ['15.0', '14.0', '12.0', '11.0', '10.0', '10.0express', '9.0', '9.0express', '8.0', '8.0express', '7.1', '7.1toolkit', '7.0', '6.0']
_known_versions = ['14.1', '14.0', '12.0', '11.0', '10.0', '10.0express', '9.0', '9.0express', '8.0', '8.0express', '7.1', '7.1toolkit', '7.0', '6.0']

# Version aliases.
__version_alias_6 = '6.0'
Expand All @@ -1277,7 +1277,7 @@ def first(self):
__version_alias_11 = '11.0'
__version_alias_12 = '12.0'
__version_alias_14 = '14.0'
__version_alias_15 = '15.0'
__version_alias_14_1 = '14.1'

# Names of registry keys containing the Visual C++ installation path (relative
# to "HKEY_LOCAL_MACHINE\SOFTWARE\\Microsoft").
Expand All @@ -1293,7 +1293,6 @@ def first(self):
__version_11_0_reg = "VisualStudio\\11.0\\Setup\\VC"
__version_12_0_reg = "VisualStudio\\12.0\\Setup\\VC"
__version_14_0_reg = "VisualStudio\\14.0\\Setup\\VC"
__version_15_0_reg = "VisualStudio\\15.0\\Setup\\VC"

# Visual C++ Toolkit 2003 does not store its installation path in the registry.
# The environment variable 'VCToolkitInstallDir' and the default installation
Expand Down