Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-09-24 05:42:19


On Sunday 24 September 2006 11:41, Bojan Resnik wrote:

> > I'm a bit unsure about sequence.unique changing the order of list
> > elements, as there are cases where order matters.
>
> Me too, but this problem with pch could happen even if the order was
> preserved in sequence.unique. The user could simply use
> lib a : [ pch apch : a.cpp [ cast _ pcheader : a.h ] ] ;
> and make the source file first.

True.

> > And what if not?
> > + if [ $(sources[2]).type ] = PCHEADER
> > + {
> > + cpp = $(sources[1]) ;
> > + h = $(sources[2]) ;
> > + }
> >
> > won't assign anything to 'cpp' and 'h' is the order is wrong, right? So
> > PCH won't work?
>
> It would, because the two lines before the if are:
> + local cpp = $(sources[2]) ;
> + local h = $(sources[1]) ;

Oops, apparently I can't read patches. Committed, thanks!

I've also committed the attached follow-up patch to clarify the logic a bit.

Thanks,
Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2



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