Ticket #8754: 0001-Boost.Build-copy-paste-MSVC-11.0-to-12.0-add-vc12-to.patch

File 0001-Boost.Build-copy-paste-MSVC-11.0-to-12.0-add-vc12-to.patch, 7.5 KB (added by Lars Viklund <zao@…>, 9 years ago)

Amended patch, introduces vc12 toolset

  • tools/build/v2/engine/build.bat

    From eae4afdcb71b22d90698611c4b50eb18a4338ff4 Mon Sep 17 00:00:00 2001
    From: Lars Viklund <zao@zao.se>
    Date: Tue, 2 Jul 2013 01:05:51 +0200
    Subject: [PATCH] Boost.Build copy-paste MSVC 11.0 to 12.0, add vc12 toolset
    
    ---
     tools/build/v2/engine/build.bat | 27 ++++++++++++++++++++++++++-
     tools/build/v2/engine/build.jam |  6 ++++++
     tools/build/v2/tools/msvc.jam   | 10 ++++++++--
     tools/build/v2/tools/msvc.py    | 10 +++++++---
     4 files changed, 47 insertions(+), 6 deletions(-)
    
    diff --git a/tools/build/v2/engine/build.bat b/tools/build/v2/engine/build.bat
    index 07da9bb..3e80e3d 100644
    a b ECHO ### You can specify the toolset as the argument, i.e.:  
    2828ECHO ###     .\build.bat msvc
    2929ECHO ###
    3030ECHO ### Toolsets supported by this script are: borland, como, gcc, gcc-nocygwin,
    31 ECHO ###     intel-win32, metrowerks, mingw, msvc, vc7, vc8, vc9, vc10, vc11
     31ECHO ###     intel-win32, metrowerks, mingw, msvc, vc7, vc8, vc9, vc10, vc11, vc12
    3232ECHO ###
    3333call :Set_Error
    3434endlocal
    call :Test_Empty %ProgramFiles%  
    101101if not errorlevel 1 set ProgramFiles=C:\Program Files
    102102
    103103call :Clear_Error
     104if NOT "_%VS120COMNTOOLS%_" == "__" (
     105    set "BOOST_JAM_TOOLSET=vc12"
     106    set "BOOST_JAM_TOOLSET_ROOT=%VS120COMNTOOLS%..\..\VC\"
     107    goto :eof)
     108call :Clear_Error
     109if EXIST "%ProgramFiles%\Microsoft Visual Studio 12.0\VC\VCVARSALL.BAT" (
     110    set "BOOST_JAM_TOOLSET=vc12"
     111    set "BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio 12.0\VC\"
     112    goto :eof)
     113call :Clear_Error
    104114if NOT "_%VS110COMNTOOLS%_" == "__" (
    105115    set "BOOST_JAM_TOOLSET=vc11"
    106116    set "BOOST_JAM_TOOLSET_ROOT=%VS110COMNTOOLS%..\..\VC\"
    set "BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0"  
    396406set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
    397407set "_known_=1"
    398408:Skip_VC11
     409if NOT "_%BOOST_JAM_TOOLSET%_" == "_vc12_" goto Skip_VC12
     410if NOT "_%VS120COMNTOOLS%_" == "__" (
     411    set "BOOST_JAM_TOOLSET_ROOT=%VS120COMNTOOLS%..\..\VC\"
     412    )
     413if "_%VCINSTALLDIR%_" == "__" call :Call_If_Exists "%BOOST_JAM_TOOLSET_ROOT%VCVARSALL.BAT" %BOOST_JAM_ARGS%
     414if NOT "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
     415    if "_%VCINSTALLDIR%_" == "__" (
     416        set "PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%"
     417        ) )
     418set "BOOST_JAM_CC=cl /nologo /RTC1 /Zi /MTd /Fobootstrap/ /Fdbootstrap/ -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.lib user32.lib"
     419set "BOOST_JAM_OPT_JAM=/Febootstrap\jam0"
     420set "BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0"
     421set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
     422set "_known_=1"
     423:Skip_VC12
    399424if NOT "_%BOOST_JAM_TOOLSET%_" == "_borland_" goto Skip_BORLAND
    400425if "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
    401426    call :Test_Path bcc32.exe )
  • tools/build/v2/engine/build.jam

    diff --git a/tools/build/v2/engine/build.jam b/tools/build/v2/engine/build.jam
    index 9c01d1d..9d3bb0d 100644
    a b toolset vc11 cl : /Fe /Fe /Fd /Fo : -D  
    377377    [ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
    378378    -I$(--python-include) -I$(--extra-include)
    379379    : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
     380toolset vc12 cl : /Fe /Fe /Fd /Fo : -D
     381    : /nologo
     382    [ opt --release : /GL /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
     383    [ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
     384    -I$(--python-include) -I$(--extra-include)
     385    : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
    380386
    381387# First set the build commands and options according to the
    382388# preset toolset.
  • tools/build/v2/tools/msvc.jam

    diff --git a/tools/build/v2/tools/msvc.jam b/tools/build/v2/tools/msvc.jam
    index cc04768..354f658 100644
    a b local rule configure-really ( version ? : options * )  
    749749            # version from the path.
    750750            # FIXME: We currently detect both Microsoft Visual Studio 9.0 and
    751751            # 9.0express as 9.0 here.
    752             if [ MATCH "(Microsoft Visual Studio 11)" : $(command) ]
     752            if [ MATCH "(Microsoft Visual Studio 12)" : $(command) ]
     753            {
     754                version = 12.0 ;
     755            }
     756            else if [ MATCH "(Microsoft Visual Studio 11)" : $(command) ]
    753757            {
    754758                version = 11.0 ;
    755759            }
    if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]  
    13851389
    13861390
    13871391# Known toolset versions, in order of preference.
    1388 .known-versions = 11.0 10.0 10.0express 9.0 9.0express 8.0 8.0express 7.1
     1392.known-versions = 12.0 11.0 10.0 10.0express 9.0 9.0express 8.0 8.0express 7.1
    13891393    7.1toolkit 7.0 6.0 ;
    13901394
    13911395# Version aliases.
    if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]  
    13961400.version-alias-9 = 9.0 ;
    13971401.version-alias-10 = 10.0 ;
    13981402.version-alias-11 = 11.0 ;
     1403.version-alias-12 = 12.0 ;
    13991404
    14001405# Names of registry keys containing the Visual C++ installation path (relative
    14011406# to "HKEY_LOCAL_MACHINE\SOFTWARE\\Microsoft").
    if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]  
    14091414.version-10.0-reg = "VisualStudio\\10.0\\Setup\\VC" ;
    14101415.version-10.0express-reg = "VCExpress\\10.0\\Setup\\VC" ;
    14111416.version-11.0-reg = "VisualStudio\\11.0\\Setup\\VC" ;
     1417.version-12.0-reg = "VisualStudio\\12.0\\Setup\\VC" ;
    14121418
    14131419# Visual C++ Toolkit 2003 does not store its installation path in the registry.
    14141420# The environment variable 'VCToolkitInstallDir' and the default installation
  • tools/build/v2/tools/msvc.py

    diff --git a/tools/build/v2/tools/msvc.py b/tools/build/v2/tools/msvc.py
    index c6dab50..2cba16b 100644
    a b def configure_really(version=None, options=[]):  
    645645            # version from the path.
    646646            # FIXME: We currently detect both Microsoft Visual Studio 9.0 and
    647647            # 9.0express as 9.0 here.
    648             if re.search("Microsoft Visual Studio 11", command):
     648            if re.search("Microsoft Visual Studio 12", command):
     649                version = '12.0'
     650            elif re.search("Microsoft Visual Studio 11", command):
    649651                version = '11.0'
    650             if re.search("Microsoft Visual Studio 10", command):
     652            elif re.search("Microsoft Visual Studio 10", command):
    651653                version = '10.0'
    652654            elif re.search("Microsoft Visual Studio 9", command):
    653655                version = '9.0'
    __cpu_type_itanium2 = ['itanium2', 'mckinley']  
    11561158
    11571159
    11581160# Known toolset versions, in order of preference.
    1159 _known_versions = ['11.0', '10.0', '10.0express', '9.0', '9.0express', '8.0', '8.0express', '7.1', '7.1toolkit', '7.0', '6.0']
     1161_known_versions = ['12.0', '11.0', '10.0', '10.0express', '9.0', '9.0express', '8.0', '8.0express', '7.1', '7.1toolkit', '7.0', '6.0']
    11601162
    11611163# Version aliases.
    11621164__version_alias_6 = '6.0'
    __version_alias_8 = '8.0'  
    11661168__version_alias_9 = '9.0'
    11671169__version_alias_10 = '10.0'
    11681170__version_alias_11 = '11.0'
     1171__version_alias_12 = '12.0'
    11691172
    11701173# Names of registry keys containing the Visual C++ installation path (relative
    11711174# to "HKEY_LOCAL_MACHINE\SOFTWARE\\Microsoft").
    __version_9_0express_reg = "VCExpress\\9.0\\Setup\\VC"  
    11791182__version_10_0_reg = "VisualStudio\\10.0\\Setup\\VC"
    11801183__version_10_0express_reg = "VCExpress\\10.0\\Setup\\VC"
    11811184__version_11_0_reg = "VisualStudio\\11.0\\Setup\\VC"
     1185__version_12_0_reg = "VisualStudio\\12.0\\Setup\\VC"
    11821186
    11831187# Visual C++ Toolkit 2003 does not store its installation path in the registry.
    11841188# The environment variable 'VCToolkitInstallDir' and the default installation