Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2004-11-19 03:37:10


Vladimir Prus wrote:
> Hi Timothy,
>
>>I have a project source tree that looks like this:
>>
>>./include
>>./src
>>./platform/win32/include
>>./platform/win32/src
>>./platform/linux/include
>>./platform/linux/src
>>
>>The root include and src are the platform agnostic files, and each platform
>>directory has the versions of the files specifically for that platform.
>>I've figured out how to optionally include different directories based on
>>the toolset, but for the life of me can't figure out how to include
>>additional source files based on the toolset/os.
>
>
> Does
>
> http://boost.org/boost-build2/doc/html/bbv2/tutorial/conditions.html
>
> help?

What if you want to support cross-compilation? For example, I am
developing a GUI library in the sandbox that is aiming to support
Win32/64 API on Windows, Cocoa on MacOS, PalmOS API on PalmOS and X11,
Motif/Lesstif and GTK+ on Linux as well as the possibility for others.

The way I see it, I would need to define a feature, e.g. gui, and define
it like this:

feature gui
:
win32 win64 cocoa palmos x11 motif gtk custom
:
propagated
;

But then how do I add <define>s specific to the platform, e.g.:
win32 --> <define>PLATF_WINDOWS <define>PLATF_WIN32
cocoa --> <define>PLATF_MACOS <define>PLATF_COCOA
?

If I were to say something like:

exe guiapp : guiapp.cpp gui//libgui/<gui>win32 ;

How can I ensure that
[1] <define>PLATF_WINDOWS <define>PLATF_WIN32 are added for guiapp.cpp
compilation; and
[2] <user-interface>gui is implied?

Also, would:

exe guiapp : guiapp.cpp gui//libgui : <gui>win32 ;

work as well as:

exe guiapp : guiapp.cpp gui//libgui ;

with:

bjam release gcc-3.3 gui=win32
bjam release cw-8.3 gui=palmos

?

SIDE NOTE: When I compile a GUI application (<user-interface>gui) in gcc
using bjam, I get a console window as well as the GUI frame. Is there a
way to remove the console window in this configuration?

Regards,
Reece

 


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