|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r76061 - in trunk/tools/build/v2: engine tools
From: ghost_at_[hidden]
Date: 2011-12-19 06:07:00
Author: vladimir_prus
Date: 2011-12-19 06:06:57 EST (Mon, 19 Dec 2011)
New Revision: 76061
URL: http://svn.boost.org/trac/boost/changeset/76061
Log:
Add support for MSVC 11.
Patch from Mateusz Åoskot. Fixes #6283.
Text files modified:
trunk/tools/build/v2/engine/build.bat | 27 ++++++++++++++++++++++++++-
trunk/tools/build/v2/engine/build.jam | 8 +++++++-
trunk/tools/build/v2/tools/msvc.jam | 10 ++++++++--
trunk/tools/build/v2/tools/msvc.py | 6 +++++-
4 files changed, 46 insertions(+), 5 deletions(-)
Modified: trunk/tools/build/v2/engine/build.bat
==============================================================================
--- trunk/tools/build/v2/engine/build.bat (original)
+++ trunk/tools/build/v2/engine/build.bat 2011-12-19 06:06:57 EST (Mon, 19 Dec 2011)
@@ -28,7 +28,7 @@
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
+ECHO ### intel-win32, metrowerks, mingw, msvc, vc7, vc8, vc9, vc10, vc11
ECHO ###
call :Set_Error
endlocal
@@ -101,6 +101,16 @@
if not errorlevel 1 set ProgramFiles=C:\Program Files
call :Clear_Error
+if NOT "_%VS110COMNTOOLS%_" == "__" (
+ set "BOOST_JAM_TOOLSET=vc11"
+ set "BOOST_JAM_TOOLSET_ROOT=%VS110COMNTOOLS%..\..\VC\"
+ goto :eof)
+call :Clear_Error
+if EXIST "%ProgramFiles%\Microsoft Visual Studio 11.0\VC\VCVARSALL.BAT" (
+ set "BOOST_JAM_TOOLSET=vc11"
+ set "BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio 11.0\VC\"
+ goto :eof)
+call :Clear_Error
if NOT "_%VS100COMNTOOLS%_" == "__" (
set "BOOST_JAM_TOOLSET=vc10"
set "BOOST_JAM_TOOLSET_ROOT=%VS100COMNTOOLS%..\..\VC\"
@@ -371,6 +381,21 @@
set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
set "_known_=1"
:Skip_VC10
+if NOT "_%BOOST_JAM_TOOLSET%_" == "_vc11_" goto Skip_VC11
+if NOT "_%VS110COMNTOOLS%_" == "__" (
+ set "BOOST_JAM_TOOLSET_ROOT=%VS110COMNTOOLS%..\..\VC\"
+ )
+if "_%VCINSTALLDIR%_" == "__" call :Call_If_Exists "%BOOST_JAM_TOOLSET_ROOT%VCVARSALL.BAT" %BOOST_JAM_ARGS%
+if NOT "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
+ if "_%VCINSTALLDIR%_" == "__" (
+ set "PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%"
+ ) )
+set "BOOST_JAM_CC=cl /nologo /RTC1 /Zi /MTd /Fobootstrap/ /Fdbootstrap/ -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.lib user32.lib"
+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_VC11
if NOT "_%BOOST_JAM_TOOLSET%_" == "_borland_" goto Skip_BORLAND
if "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
call :Test_Path bcc32.exe )
Modified: trunk/tools/build/v2/engine/build.jam
==============================================================================
--- trunk/tools/build/v2/engine/build.jam (original)
+++ trunk/tools/build/v2/engine/build.jam 2011-12-19 06:06:57 EST (Mon, 19 Dec 2011)
@@ -370,7 +370,13 @@
[ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
-I$(--python-include) -I$(--extra-include)
: kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
-
+toolset vc11 cl : /Fe /Fe /Fd /Fo : -D
+ : /nologo
+ [ opt --release : /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
+ [ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
+ -I$(--python-include) -I$(--extra-include)
+ : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
+
# First set the build commands and options according to the
# preset toolset.
toolset = [ MATCH --toolset=(.*) : $(ARGV) ] ;
Modified: trunk/tools/build/v2/tools/msvc.jam
==============================================================================
--- trunk/tools/build/v2/tools/msvc.jam (original)
+++ trunk/tools/build/v2/tools/msvc.jam 2011-12-19 06:06:57 EST (Mon, 19 Dec 2011)
@@ -736,7 +736,11 @@
# 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 10)" : $(command) ]
+ if [ MATCH "(Microsoft Visual Studio 11)" : $(command) ]
+ {
+ version = 11.0 ;
+ }
+ else if [ MATCH "(Microsoft Visual Studio 10)" : $(command) ]
{
version = 10.0 ;
}
@@ -1351,7 +1355,7 @@
# Known toolset versions, in order of preference.
-.known-versions = 10.0 10.0express 9.0 9.0express 8.0 8.0express 7.1 7.1toolkit 7.0 6.0 ;
+.known-versions = 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 ;
@@ -1360,6 +1364,7 @@
.version-alias-8 = 8.0 ;
.version-alias-9 = 9.0 ;
.version-alias-10 = 10.0 ;
+.version-alias-11 = 11.0 ;
# Names of registry keys containing the Visual C++ installation path (relative
# to "HKEY_LOCAL_MACHINE\SOFTWARE\\Microsoft").
@@ -1372,6 +1377,7 @@
.version-9.0express-reg = "VCExpress\\9.0\\Setup\\VC" ;
.version-10.0-reg = "VisualStudio\\10.0\\Setup\\VC" ;
.version-10.0express-reg = "VCExpress\\10.0\\Setup\\VC" ;
+.version-11.0-reg = "VisualStudio\\11.0\\Setup\\VC" ;
# Visual C++ Toolkit 2003 does not store its installation path in the registry.
# The environment variable 'VCToolkitInstallDir' and the default installation
Modified: trunk/tools/build/v2/tools/msvc.py
==============================================================================
--- trunk/tools/build/v2/tools/msvc.py (original)
+++ trunk/tools/build/v2/tools/msvc.py 2011-12-19 06:06:57 EST (Mon, 19 Dec 2011)
@@ -646,6 +646,8 @@
# version from the path.
# FIXME: We currently detect both Microsoft Visual Studio 9.0 and
# 9.0express as 9.0 here.
+ if re.search("Microsoft Visual Studio 11", command):
+ version = '11.0'
if re.search("Microsoft Visual Studio 10", command):
version = '10.0'
elif re.search("Microsoft Visual Studio 9", command):
@@ -1154,7 +1156,7 @@
# Known toolset versions, in order of preference.
-_known_versions = ['10.0', '10.0express', '9.0', '9.0express', '8.0', '8.0express', '7.1', '7.1toolkit', '7.0', '6.0']
+_known_versions = ['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'
@@ -1163,6 +1165,7 @@
__version_alias_8 = '8.0'
__version_alias_9 = '9.0'
__version_alias_10 = '10.0'
+__version_alias_11 = '11.0'
# Names of registry keys containing the Visual C++ installation path (relative
# to "HKEY_LOCAL_MACHINE\SOFTWARE\\Microsoft").
@@ -1175,6 +1178,7 @@
__version_9_0express_reg = "VCExpress\\9.0\\Setup\\VC"
__version_10_0_reg = "VisualStudio\\10.0\\Setup\\VC"
__version_10_0express_reg = "VCExpress\\10.0\\Setup\\VC"
+__version_11_0_reg = "VisualStudio\\11.0\\Setup\\VC"
# Visual C++ Toolkit 2003 does not store its installation path in the registry.
# The environment variable 'VCToolkitInstallDir' and the default installation
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk