Boost logo

Boost Users :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-07-30 06:56:52


Ames, Andreas (Andreas) wrote:

> Hi all,
>
> as most of my colleagues insist on using Visual Studio, I have made a
> vcproj-wrapper around Boost.Build v1 for 1.33.1. The Jamfile looks
> like this:
>
> <Jamfile>
> project-root ;

In V2, this is not necessary.

> BOOST_LOCAL_STAGE_DIR ?= stage ;

Is this an environment var? Please read:

        http://boost.org/boost-build2/doc/html/bbv2/faq/envar.html

>
> rule Pseudo ( target : libname : kind : variant : name_prefix ? )
> {
> LIBNAME = $(libname) ;
> LIBKIND = $(kind) ;
> VARIANT = $(variant) ;
> REALNAME = $(name_prefix)$(LIBNAME) ;
> REALNAME ?= $(LIBNAME) ;
> NOTFILE $(target) ;
> DEPENDS $(target) :
> $(BOOST_LOCAL_STAGE_DIR)/$(LIBKIND)/$(LIBNAME)/$(VARIANT) ; stage
> $(BOOST_LOCAL_STAGE_DIR)/$(LIBKIND)/$(LIBNAME)/$(VARIANT)
> :
> <$(LIBKIND)>@boost/libs/$(LIBNAME)/build/boost_$(REALNAME)

You'd have to adjust this, too. To link to static version of some build library you'd
use

        /path-to-boost//some-library/<link>static

and for shared link use "<link>shared".

> :
> <sysinclude>../../../boost

Use 'include'.

> <debug-symbols>on
> <debug-store>database
> <runtime-build>$(VARIANT)
> <runtime-link>dynamic
> <native-wchar_t>on
> :
> $(VARIANT)
> ;
> }
>
> Pseudo signals_lib_debug
> : signals
> : lib
> : debug
> ;
>
> Pseudo signals_lib_release
> : signals
> : lib
> : release
> ;
> </Jamfile>
>
> Furthermore I've created a Jamrules and a boost-build.jam like
> follows:
>
> <Jamrules>
> project boost : ../../../boost ;
> </Jamrules>
>
> <boost-build.jam>
> boost-build ../../../boost/tools/build/v1 ;
> </boost-build.jam>
>
> From my vcproj-files I can then just invoke bjam with the appropriate
> target and TOOLS-spec.
>
> 1) Unfortunately this doesn't work any longer with Boost.Build v2.
> After changing boost-build.jam in the obvious way, I just get bjam
> to display:
>
> error: Could not find parent for project at '.'
> error: Did not find Jamfile or project-root.jam in any parent
> directory.
>
> although the Jamfile is definitely there. The same thing happens,
> when I change the name to Jamfile.v2.

The top-level directory must have a file called 'Jamroot', as opposed to 'Jamfile'.
Are you sure it's there?

>
> 2) Skimming over the docs, I don't see Jamrules (which was previously
> needed) mentioned. Is it still necessary?

No. In V1, top-level dir had to have Jamfile+Jamrules. In V2, top-level dir
should have Jamroot.

> 3) Finally, the build wrapper needs to be selfcontained (we get it
> from our repository), so site-config.jam and user-config.jam must
> not be mandatory. I just wonder, where to specify my 'using'
> rule(s) (like 'using msvc : 8.0 ;').

In your Jamroot.

- Volodya


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net