Boost logo

Boost-Build :

From: Alex Besogonov (cyberax_at_[hidden])
Date: 2006-04-26 08:24:21

Vladimir Prus wrote:
>> PCH is nowhere close to "release" state. There are numerous issues with
>> PCH on MSVC:
>> 1. Property propagation (I've raised this issue before).
> Is this the same issue that Bojan has reported.
Yes, I think.

>> 2. Debug information: PCH is does not work well with C7-style debug info
>> and database-style debug storage is currently broken ("# not used yet").
> What changes are necessary in this part?
It's necessary to add -Fd option to command line:

Currently I'm using this kludge:
actions compile.c++ bind PCH_HEADER PCH_FILE
     $(.CC) /Zm800 -nologo -TP -U$(UNDEFS) $(CFLAGS) $(C++FLAGS)
$(USER_CFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)-D$(DEFINES)
$(nl)"-I$(INCLUDES)")" -c -Fo"$(<[1]:W)" -Yu"$(PCH_HEADER:D=)"
-Fp"$(PCH_FILE:W)" -Fd"$(PCH_FILE:S=.pdb)"
It works, but only if PCH_FILE is used.

>> 3. Problems with PCH and static libraries.
> Will /Yl__bjam_pch_symbol option fix them?
It should.

>> 4. It would be nice if Boost libraries themselves used precompiled
>> headers (at least for testing purposes).
> But it's lot of work.
Not really, it's just neccessary to add something like:
#include "<LIBNAME>.hpp"
I can try to add PCH to some libraries and see

>> 5. PCH on GCC is broken (the last time I checked).
> Well, I never though it works at all ;-)
There's a patch somewhere in this list which adds PCH support to GCC. It
_almost_ works. The only issue with this patch: PCH is built _after_ the
code which uses it :)

With respect,
             Alex Besogonov (cyberax_at_[hidden])

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at