Ticket #6283: boost-build-msvc-11.2.patch

File boost-build-msvc-11.2.patch, 6.3 KB (added by Mateusz Loskot, 11 years ago)

Updated version of patch for Boost.Build with Visual Studio 11 support

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

     
    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
     31ECHO ###     intel-win32, metrowerks, mingw, msvc, vc7, vc8, vc9, vc10, vc11
    3232ECHO ###
    3333call :Set_Error
    3434endlocal
     
    101101if not errorlevel 1 set ProgramFiles=C:\Program Files
    102102
    103103call :Clear_Error
     104if NOT "_%VS110COMNTOOLS%_" == "__" (
     105    set "BOOST_JAM_TOOLSET=vc11"
     106    set "BOOST_JAM_TOOLSET_ROOT=%VS110COMNTOOLS%..\..\VC\"
     107    goto :eof)
     108call :Clear_Error
     109if EXIST "%ProgramFiles%\Microsoft Visual Studio 11.0\VC\VCVARSALL.BAT" (
     110    set "BOOST_JAM_TOOLSET=vc11"
     111    set "BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio 11.0\VC\"
     112    goto :eof)
     113call :Clear_Error
    104114if NOT "_%VS100COMNTOOLS%_" == "__" (
    105115    set "BOOST_JAM_TOOLSET=vc10"
    106116    set "BOOST_JAM_TOOLSET_ROOT=%VS100COMNTOOLS%..\..\VC\"
     
    371381set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
    372382set "_known_=1"
    373383:Skip_VC10
     384if NOT "_%BOOST_JAM_TOOLSET%_" == "_vc11_" goto Skip_VC11
     385if NOT "_%VS110COMNTOOLS%_" == "__" (
     386    set "BOOST_JAM_TOOLSET_ROOT=%VS110COMNTOOLS%..\..\VC\"
     387    )
     388if "_%VCINSTALLDIR%_" == "__" call :Call_If_Exists "%BOOST_JAM_TOOLSET_ROOT%VCVARSALL.BAT" %BOOST_JAM_ARGS%
     389if NOT "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
     390    if "_%VCINSTALLDIR%_" == "__" (
     391        set "PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%"
     392        ) )
     393set "BOOST_JAM_CC=cl /nologo /RTC1 /Zi /MTd /Fobootstrap/ /Fdbootstrap/ -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.lib user32.lib"
     394set "BOOST_JAM_OPT_JAM=/Febootstrap\jam0"
     395set "BOOST_JAM_OPT_MKJAMBASE=/Febootstrap\mkjambase0"
     396set "BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0"
     397set "_known_=1"
     398:Skip_VC11
    374399if NOT "_%BOOST_JAM_TOOLSET%_" == "_borland_" goto Skip_BORLAND
    375400if "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
    376401    call :Test_Path bcc32.exe )
  • tools/build/v2/engine/build.jam

     
    370370    [ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
    371371    -I$(--python-include) -I$(--extra-include)
    372372    : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
    373 
     373toolset vc11 cl : /Fe /Fe /Fd /Fo : -D
     374    : /nologo
     375    [ opt --release : /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
     376    [ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
     377    -I$(--python-include) -I$(--extra-include)
     378    : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
     379   
    374380# First set the build commands and options according to the
    375381# preset toolset.
    376382toolset = [ MATCH --toolset=(.*) : $(ARGV) ] ;
  • tools/build/v2/tools/msvc.jam

     
    736736            # version from the path.
    737737            # FIXME: We currently detect both Microsoft Visual Studio 9.0 and
    738738            # 9.0express as 9.0 here.
    739             if [ MATCH "(Microsoft Visual Studio 10)" : $(command) ]
     739            if [ MATCH "(Microsoft Visual Studio 11)" : $(command) ]
    740740            {
     741                version = 11.0 ;
     742            }
     743            else if [ MATCH "(Microsoft Visual Studio 10)" : $(command) ]
     744            {
    741745                version = 10.0 ;
    742746            }
    743747            else if [ MATCH "(Microsoft Visual Studio 9)" : $(command) ]
     
    13511355
    13521356
    13531357# Known toolset versions, in order of preference.
    1354 .known-versions = 10.0 10.0express 9.0 9.0express 8.0 8.0express 7.1 7.1toolkit 7.0 6.0 ;
     1358.known-versions = 11.0 10.0 10.0express 9.0 9.0express 8.0 8.0express 7.1 7.1toolkit 7.0 6.0 ;
    13551359
    13561360# Version aliases.
    13571361.version-alias-6 = 6.0 ;
     
    13601364.version-alias-8 = 8.0 ;
    13611365.version-alias-9 = 9.0 ;
    13621366.version-alias-10 = 10.0 ;
     1367.version-alias-11 = 11.0 ;
    13631368
    13641369# Names of registry keys containing the Visual C++ installation path (relative
    13651370# to "HKEY_LOCAL_MACHINE\SOFTWARE\\Microsoft").
     
    13721377.version-9.0express-reg = "VCExpress\\9.0\\Setup\\VC" ;
    13731378.version-10.0-reg = "VisualStudio\\10.0\\Setup\\VC" ;
    13741379.version-10.0express-reg = "VCExpress\\10.0\\Setup\\VC" ;
     1380.version-11.0-reg = "VisualStudio\\11.0\\Setup\\VC" ;
    13751381
    13761382# Visual C++ Toolkit 2003 does not store its installation path in the registry.
    13771383# The environment variable 'VCToolkitInstallDir' and the default installation
  • tools/build/v2/tools/msvc.py

     
    646646            # version from the path.
    647647            # FIXME: We currently detect both Microsoft Visual Studio 9.0 and
    648648            # 9.0express as 9.0 here.
     649            if re.search("Microsoft Visual Studio 11", command):
     650                version = '11.0'
    649651            if re.search("Microsoft Visual Studio 10", command):
    650652                version = '10.0'
    651653            elif re.search("Microsoft Visual Studio 9", command):
     
    11541156
    11551157
    11561158# Known toolset versions, in order of preference.
    1157 _known_versions = ['10.0', '10.0express', '9.0', '9.0express', '8.0', '8.0express', '7.1', '7.1toolkit', '7.0', '6.0']
     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']
    11581160
    11591161# Version aliases.
    11601162__version_alias_6 = '6.0'
     
    11631165__version_alias_8 = '8.0'
    11641166__version_alias_9 = '9.0'
    11651167__version_alias_10 = '10.0'
     1168__version_alias_11 = '11.0'
    11661169
    11671170# Names of registry keys containing the Visual C++ installation path (relative
    11681171# to "HKEY_LOCAL_MACHINE\SOFTWARE\\Microsoft").
     
    11751178__version_9_0express_reg = "VCExpress\\9.0\\Setup\\VC"
    11761179__version_10_0_reg = "VisualStudio\\10.0\\Setup\\VC"
    11771180__version_10_0express_reg = "VCExpress\\10.0\\Setup\\VC"
     1181__version_11_0_reg = "VisualStudio\\11.0\\Setup\\VC"
    11781182
    11791183# Visual C++ Toolkit 2003 does not store its installation path in the registry.
    11801184# The environment variable 'VCToolkitInstallDir' and the default installation