Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-06-18 05:40:35


janssoaf wrote:

> I'm unsure about the jam regular expression syntax. In my
> user-config.jam I have
>
> using msvc : 6 ;
> using msvc : 7.1 ;
>
> and I get the compiler flags twice on the command line (when using
> toolset msvc-7.1 and when using toolset msvc-6)

It turns out I've had two bugs in two-line snippet. I had the regular
expression incorrect, and additionally was adding those flags for all msvc
versions, not just for 7*.

I've comitted the attached patch.

Thanks,
Volodya
 --Boundary-00=_jas0Aj7Zb/IkulJ Content-Type: text/x-diff;
charset="iso-8859-1";
name="msvc.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="msvc.diff"

Index: msvc.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/msvc.jam,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- msvc.jam 7 Jun 2004 07:24:13 -0000 1.20
+++ msvc.jam 18 Jun 2004 10:38:30 -0000 1.21
@@ -128,12 +128,13 @@
local prefix = $(setup) ;

+ local condition ;
if $(version)
{
vendor = $(vendor)- ;
vendor ?= "" ;

- local condition = -$(vendor)$(version) ;
+ condition = -$(vendor)$(version) ;
condition ?= "" ;
condition = <toolset>msvc$(condition) ;

@@ -157,9 +158,9 @@
# The following options work only for 7* versions. It means
# that if the user has not specified a version he gets 6.0 compatible
# behavious (i.e. a bit buggy)
- if [ MATCH ^(7|[^7].*) : $(version) ]
+ if [ MATCH ^(7\..*) : $(version) ]
{
- flags msvc.compile CFLAGS : /Zc:forScope /Zc:wchar_t ;
+ flags msvc.compile CFLAGS $(condition) : /Zc:forScope /Zc:wchar_t ;
}

}
 --Boundary-00=_jas0Aj7Zb/IkulJ--


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