|
Boost-Build : |
From: Bojan Resnik (resnikb_at_[hidden])
Date: 2006-09-24 03:41:32
My apologies to Vladimir, I accidentally sent this mail to his private address:
> > A recent introduction of SORT in sequence.unique rule is causing PCH
> > generation to fail sometimes by attempting to compile the header file
> > instead of the source file. This happens in one of my projects, but I
> > have been unable to create a reproducible test case.
>
> 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.
> 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]) ;
-- Bojan Resnik
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