Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-04-10 05:12:23


Hi Andre,
> I just managed to get BBv2 to pass the tests using os=cygwin/toolset=msvc.
> The patch is attached.

Thanks for the patch and log message. Applied.

> I now have a question. I have a Jamfile containing something like this:
>
> if [ modules.peek : NT ]
> {
> lib openssl : : <name>libeay32
> <search>$(tools-lib-dir) <toolset>msvc ;
> lib gdi : : <name>gdi32 <toolset>msvc ;
> lib ws2 : : <name>ws2_32 <toolset>msvc ;
> }
> else
> {
> lib openssl : : <name>crypto
> <search>$(tools-lib-dir) <toolset>gcc ;
> lib boost_regex : : <name>boost_regex
> <search>$(tools-lib-dir) <toolset>gcc ;
> }
>
> exe a : $(SOURCES).cpp openssl boost_regex : <toolset>gcc ;
> exe a : $(SOURCES).cpp openssl gdi ws2 : <toolset>msvc ;
>
> Unfortunately, that doesn't work very well if I want to build with the
> following configurations:

Let's make sure I understand the problem.

> 1) os=nt/toolset=msvc

This should work OK, right?

> 2) os=cygwin/toolset=msvc

This should link to gdi and ws2, which are not declared under GYWIN, right?

> 3) os=cygwin/toolset=gcc

This should work, I think....

> 4) os=freebsd/toolset=gcc

This should work as well, I think.

If I understand the situation correctly, then the right solution should be to
remove the 'if' statement:

lib openssl : : <name>libeay32
<search>$(tools-lib-dir) <toolset>msvc ;

lib openssl : : <name>crypto
<search>$(tools-lib-dir) <toolset>gcc ;

lib gdi : : <name>gdi32 <toolset>msvc ;
lib ws2 : : <name>ws2_32 <toolset>msvc ;
lib boost_regex : : <name>boost_regex
<search>$(tools-lib-dir) <toolset>gcc ;

The only problem is that when building on gcc, build system will try to
create gdi, notice that requirements can't be satisfied, and say
"warning: skipped build of ./gdi ...." --- harmless, but ugly.

This can be helped by declaring that "gdi" should be built only when
explicitly requested. We don't have such a feature yet, but it's pretty
simple and actually, is rather high priority already. See
http://zigzag.cs.msu.su:7814/scarab/issues/id/BB29

Does this approach look OK, or there are some issues I've missed?

- 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