|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-09-07 05:39:03
Thorsten Ottosen wrote:
> "Toon Knapen" <toon.knapen_at_[hidden]> wrote in message
> news:41385739.1060404_at_fft.be...
>
> | Vladimir Prus wrote:
> | > I'd think that header should only include standard headers, not the
> | > application's headers.
> |
> | I understand that PCH support is not easy but if it is available, it
> | should also be able to use precompiled headers for non-system headers
> | (i.e. application headers) IMO.
>
> some compilers only support one pch-file.
But that does not prevent using application headers. You can have one
super-include which includes both STL headers and application headers.
> | > Another danger is that if all translation units include the central
> | > header, which grabs <vector>, <map>, <algorithm> and the like, then the
> | > programmers might forget to add those include to translation units
> | > themself, so with "USE_PCH" undefined there will be compile errors.
> | > Seems not good for cross-platform programming.
> |
> | I also wondered about this so I'm keen to know the answer too.
>
> is this really a problem?
I don't have practical experience, but I believe that all files in my project
start to indirectly include BGL headers, the performance on compilers without
PCH will be very poor.
> | The problem is still that translation unit
> |
> | > which uses std::vector without include <vector> will compile fine with
> | > PCH, but won't compile elsewhere.
> |
> | Anyway, to benefit from PCH, it is best to make a giant header which
> | includes all headers IIUC (as read in C++ templates of Vandevoorde and
> | Josuttis). Because a including the same headers but in a different order
> | results in a different compiler-state.
>
> I would hope these two headers could be added to boost:
>
> /boost/std.hpp
> /boost/boost.hpp
>
> the latter should include the former.
>
> and then we should have macros like
>
> BOOST_HAS_STD_PCH
> BOOST_HAS_BOOST_PCH
>
> I suggest we start investigating how pch can be used from the command line
> from all the compilers. I can help with comeau and vc7.1 at least. We just
> needs a person in charge of the whole operation..
I think that thanks to another user, I more or less understand 7.1. Help with
Comeau will be appreciated. And I can act as the person in charge ;-)
- Volodya
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