Boost logo

Boost-Build :

From: Alexey Pakhunov (alexeypa_at_[hidden])
Date: 2005-12-02 12:34:09


Johan Nilsson wrote:
> So, any chance of adding explicit vc8 toolset support to
> build.bat/build.jam?

Maybe. :-)

The attached diff adds 'vc8' toolset to build.bat/jam. The difference
between 'vc7' and 'vc8':

- Removed deprecated compiler options: /GZ and /GB;
- /ML and /MLd are replaced by /MT and /MTd;
- Added /RTC1 for bootstrap 'jam0';
- Added /D_CRT_SECURE_NO_DEPRECATE /wd4996 for both jam0 and bjam.

Best regards/Venlig hilsen,
   Alexey Pakhunov.

Index: build.bat
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/jam_src/build.bat,v
retrieving revision 1.37
diff -u -r1.37 build.bat
--- build.bat 22 Nov 2005 06:49:10 -0000 1.37
+++ build.bat 2 Dec 2005 17:19:35 -0000
@@ -19,7 +19,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, intel-win32, metrowerks, mingw, msvc, vc7
+ECHO ### Toolsets supported by this script are: borland, como, gcc, gcc-nocygwin, intel-win32, metrowerks, mingw, msvc, vc7, vc8
 ECHO ###
 set _error_=
 endlocal
@@ -54,6 +54,19 @@
 REM Sets BOOST_JAM_TOOLSET to the first found toolset.
 REM May also set BOOST_JAM_TOOLSET_ROOT to the
 REM location of the found toolset.
+
+if "_%ProgramFiles%_" == "__" set ProgramFiles=C:\Program Files
+
+setlocal & endlocal
+if NOT "_%VS80COMNTOOLS%_" == "__" (
+ set BOOST_JAM_TOOLSET=vc8
+ set BOOST_JAM_TOOLSET_ROOT=%VS80COMNTOOLS%..\..\VC\
+ goto :eof)
+setlocal & endlocal
+if EXIST "%ProgramFiles%\Microsoft Visual Studio 8\VC\bin\VCVARS32.BAT" (
+ set BOOST_JAM_TOOLSET=vc8
+ set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio 8\VC\
+ goto :eof)
 setlocal & endlocal
 if NOT "_%VS71COMNTOOLS%_" == "__" (
     set BOOST_JAM_TOOLSET=vc7
@@ -70,21 +83,11 @@
     set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio .NET 2003\VC7\
     goto :eof)
 setlocal & endlocal
-if EXIST "C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\bin\VCVARS32.BAT" (
- set BOOST_JAM_TOOLSET=vc7
- set BOOST_JAM_TOOLSET_ROOT=C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\
- goto :eof)
-setlocal & endlocal
 if EXIST "%ProgramFiles%\Microsoft Visual Studio .NET\VC7\bin\VCVARS32.BAT" (
     set BOOST_JAM_TOOLSET=vc7
     set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio .NET\VC7\
     goto :eof)
 setlocal & endlocal
-if EXIST "C:\Program Files\Microsoft Visual Studio .NET\VC7\bin\VCVARS32.BAT" (
- set BOOST_JAM_TOOLSET=vc7
- set BOOST_JAM_TOOLSET_ROOT=C:\Program Files\Microsoft Visual Studio .NET\VC7\
- goto :eof)
-setlocal & endlocal
 if NOT "_%MSVCDir%_" == "__" (
     set BOOST_JAM_TOOLSET=msvc
     set BOOST_JAM_TOOLSET_ROOT=%MSVCDir%\
@@ -95,21 +98,11 @@
     set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual Studio\VC98\
     goto :eof)
 setlocal & endlocal
-if EXIST "C:\Program Files\Microsoft Visual Studio\VC98\bin\VCVARS32.BAT" (
- set BOOST_JAM_TOOLSET=msvc
- set BOOST_JAM_TOOLSET_ROOT=C:\Program Files\Microsoft Visual Studio\VC98\
- goto :eof)
-setlocal & endlocal
 if EXIST "%ProgramFiles%\Microsoft Visual C++\VC98\bin\VCVARS32.BAT" (
     set BOOST_JAM_TOOLSET=msvc
     set BOOST_JAM_TOOLSET_ROOT=%ProgramFiles%\Microsoft Visual C++\VC98\
     goto :eof)
 setlocal & endlocal
-if EXIST "C:\Program Files\Microsoft Visual C++\VC98\bin\VCVARS32.BAT" (
- set BOOST_JAM_TOOLSET=msvc
- set BOOST_JAM_TOOLSET_ROOT=C:\Program Files\Microsoft Visual C++\VC98\
- goto :eof)
-setlocal & endlocal
 call :Test_Path cl.exe
 if not errorlevel 1 (
     set BOOST_JAM_TOOLSET=msvc
@@ -253,6 +246,21 @@
     set BOOST_JAM_OPT_YYACC=/Febootstrap\yyacc0
     set _known_=1
 )
+if "_%BOOST_JAM_TOOLSET%_" == "_vc8_" (
+ if NOT "_%MSVCDir%_" == "__" (
+ set BOOST_JAM_TOOLSET_ROOT=%MSVCDir%\) )
+if "_%BOOST_JAM_TOOLSET%_" == "_vc8_" (
+ if EXIST "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" (
+ call "%BOOST_JAM_TOOLSET_ROOT%bin\VCVARS32.BAT" ) )
+if "_%BOOST_JAM_TOOLSET%_" == "_vc8_" (
+ if not "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
+ set PATH=%BOOST_JAM_TOOLSET_ROOT%bin;%PATH%)
+ set BOOST_JAM_CC=cl /nologo /RTC1 /Zi /MTd -DNT -DYYDEBUG -D_CRT_SECURE_NO_DEPRECATE -wd4996 kernel32.lib advapi32.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
+)
 if "_%BOOST_JAM_TOOLSET%_" == "_borland_" (
     if "_%BOOST_JAM_TOOLSET_ROOT%_" == "__" (
         call :Test_Path bcc32.exe ) )
Index: build.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/jam_src/build.jam,v
retrieving revision 1.76
diff -u -r1.76 build.jam
--- build.jam 22 Nov 2005 05:57:38 -0000 1.76
+++ build.jam 2 Dec 2005 17:28:10 -0000
@@ -264,6 +264,13 @@
     [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ]
     -I$(--python-include)
     : kernel32.lib advapi32.lib $(--python-lib[1]) ;
+## Microsoft Visual C++ 2005
+toolset vc8 cl : /Fe : -D
+ : /nologo
+ [ opt --release : /MT /O2 /Ob2 /Gy /GF /GA /D_CRT_SECURE_NO_DEPRECATE /wd4996 ]
+ [ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /D_CRT_SECURE_NO_DEPRECATE /wd4996 ]
+ -I$(--python-include)
+ : kernel32.lib advapi32.lib $(--python-lib[1]) ;
 ## VMS/OpenVMS DEC C
 toolset vmsdecc cc : /OBJECT= : "/DEFINES=(" "," ")"
     : /STANDARD=VAXC /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES

 


Boost-Build 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