|
Boost-Build : |
From: Bojan Resnik (resnikb_at_[hidden])
Date: 2006-09-22 08:52:07
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.
The problem actually exists and manifests itself when the source
file object identifier is 'less' than the header's identifier:
lib a : [ pch apch : [ cast _ pcheader : a.h ] a.cpp ] ;
In my case, after the targets have been created,
a.h=object(file-target)@2238, a.cpp=object(file-target)@400. The
sequence expected by pch-generator is a.h a.cpp. When sequence.unique
rule is invoked from targets.jam:1187, it sorts the original sequence
[ object(file-target)@2238 object(file-target)@400 ] into [
object(file-target)@400 object(file-target)@2238 ], thus switching
places of a.h and a.cpp. pch-generator then incorrectly creates
<pch-source>a.h and <pch-header>a.cpp features, which causes the
system to attempt to compile the header file.
Attached is patch to pch.jam that checks the types of arguments to
make sure that the correct ones are used for source and header.
-- 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