Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-03-31 03:30:49


Hi Vincent,

> rule init ( a1 * : a2 * : a3 * )
> {
> + if $(a2) = nocygwin
> + {
> + flags gcc.compile OPTIONS : -mno-cygwin ;
> + flags gcc.link OPTIONS : -mno-cygwin ;
> + }
> +
> if $(a1)
> {
> local version = $(a1[1]) ;
>
> It enables the following line in
> boost_1_31_0/tools/build/v2/user-config.jam:
>
> using gcc : : nocygwin ;

> I am a complete novice at jam, bjam, and Boost.Build. The above was in
> support of my first Jamfile, so I figure it must violate at least good
> style, if nothing else.

The first question is why "-mno-cygwin" is needed? I guess it causes gcc not
to use cygwin runtime? Why do you need this switch?

> Could an improved version of this be committed to CVS? If not, what are
> the complications?

There are two problems:

1. It's not possible to specify 'nocygwin' if you also specify the location of
the compiler.

2. I'm not sure that specifying 'nocygwin' in 'using' is good idea. The
'using' util now was used only to specify where to find the compiler, but not
what flags it should use. You can put this in your top-level Jamfile:

project
: requirements <cflags>-mno-cygwin <linkflags>-mno-cygwin
;

to achieve the same effect. What do you think?

- Volodya

 


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