Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-09-28 15:17:33


Bojan Resnik wrote:
> I fiddled some more with this and noticed that the actual command line is:
>
> cl /Zm800 -nologo -TP /Z7 /Od /Ob0 /W4 /GR /MDd /Zc:forScope
> /Zc:wchar_t /Wp64 /wd4675
>
> The "/Ze and /Za" error appeared because both /Zc options above are
> not recognized by the compiler - they are specific to MSVC 7 and
> newer. I put an "ECHO $(version) ;" in msvc.jam just above the
> condition that enables these options, and it seems that the compilers
> are correctly recognized as "6" and "7.1". I am not sure why the /Zc
> flags are still added, though. The /Wp64 and /wd4675 should also be
> reserved for MSVC newer than 6.

The attached patch fixes both the /Wp64 command line error and /wd4675
command line warning when using msvc-6.0.

- Reece
 --------------080409070308050307030707 Content-Type: text/plain;
name="warnings.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="warnings.diff"

Index: msvc.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/msvc.jam,v
retrieving revision 1.56
diff -u -r1.56 msvc.jam
--- msvc.jam 26 Sep 2005 06:02:41 -0000 1.56
+++ msvc.jam 28 Sep 2005 20:11:20 -0000
@@ -252,6 +252,8 @@
if ! [ MATCH ^(6\\.) : $(version) ]
{
flags msvc.compile CFLAGS $(condition) : /Zc:forScope /Zc:wchar_t ;
+ flags msvc.compile.c++ C++FLAGS $(condition) : /wd4675 ;
+ flags msvc.compile CFLAGS $(condition)/<warnings>all : /Wp64 ; # 64-bit compatibility warning
}

# 8.0 deprecates some of the options
@@ -361,7 +363,7 @@

flags msvc.compile CFLAGS <warnings>on : /W3 ;
flags msvc.compile CFLAGS <warnings>off : /W0 ;
-flags msvc.compile CFLAGS <warnings>all : /W4 /Wp64 ;
+flags msvc.compile CFLAGS <warnings>all : /W4 ;
flags msvc.compile CFLAGS <warnings-as-errors>on : /WX ;

flags msvc.compile C++FLAGS <exception-handling>on/<asynch-exceptions>off/<extern-c-nothrow>off : /EHs ;
@@ -387,8 +389,6 @@
flags msvc.compile UNDEFS <undef> ;
flags msvc.compile INCLUDES <include> ;

-flags msvc.compile.c++ C++FLAGS : /wd4675 ;
-
# The actions differ only by explicit selection of input language
actions compile.c bind RSP
{
 --------------080409070308050307030707--


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