Boost logo

Boost-Build :

From: Andrey Melnikov (melnikov_at_[hidden])
Date: 2005-07-05 19:04:04


Jim Tilander wrote:
> Hi!
>
> I'm trying to adapt bbv2-m10 to our project

What is bbv2-m10? Is it too old?

and I'm new to
> Jam/BoostBuild in general so please bear with me. I'm wondering how to
> do two things:
>
> 1. Redirect all output (object files, libraries and executables) to a
> custom directory. I'd like to keep the current hierarchy with
> debug/release directories, but I'd like to move them from the current
> location to a higher location in the directory tree, like this:
>
> Current:
> Libs->MyLib->bin->[.lib.obj]
>
> New:
> Libs->Intermediate->MyLib->bin->[.lib.obj]

project MyLib : build-dir "../Intermediate" ;

This build-dir seems to become a FAQ.

I'm adding it to my Getting Started document prototype in Wiki

http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Boost.Build_V2/GettingStarted

Don't hesitate to add your wishes about Visual Studio Migration Guide
there - anybody can edit Wiki pages, and all changes are reversible.

>
> 2. In my compiler flags <cflag> I'd like to reference the output
> directory (the one we changed in 1). This is for this specific instance
> for precompiled headers, so the actual flag I want to pass is something
> like this (but of course I don't know the proper variablenames):
>
> <cflag>-Fp$(intermediate_path)/$(project_name).pch

It isn't a good idea to specify cflags manually in jamfile. It's better
to patch msvc.jam toolset definition file and create features like

<pch>off|use|create|hdrstop
<pch-header>StdAfx.h
<pch-db>StdAfx.pch

Also you need to track dependencies correctly: all files with <pch>use
should depend on StdAfx.pch, and stdafx.cpp should create StdAfx.pch
output.

Can someone more fluent in bbv2 tell me is this a lot of work?

Also I wonder how other compilers besides msvc implement precompiler
headers? It looks like bcb can use #pragma hdrstop too.

Andrey

 


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