|
Boost-Build : |
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-09-08 11:32:01
"Vladimir Prus" <ghost_at_[hidden]> wrote in message
news:200409071439.03531.ghost_at_cs.msu.su...
| Thorsten Ottosen wrote:
| > "Toon Knapen" <toon.knapen_at_[hidden]> wrote in message
| > | > 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.
yeah, that should not be a problem...it is easy to include the correct headers
in the non-pch case if you
can specify bjam -no_pch or something
| > I would hope these two headers could be added to boost:
| >
| > /boost/std.hpp
attached in beta version.
| > /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 ;-)
great!
Here is comeau's options (from
http://www.comeaucomputing.com/4.0/docs/userman/options.html):
--pch Automatically use and/or create a precompiled header file - for details,
see the "Precompiled Headers" section in this chapter. If --use_pch
or --create_pch (manual PCH mode) appears on the command line following this
option, its effect is erased.
--create_pch file-name If other conditions are satisfied (see the "Precompiled
Headers" section), create a precompiled header file with the specified name.
If --pch (automatic PCH mode) or --use_pch appears on the command line
following this option, its effect is erased.
--use_pch file-name Use a precompiled header file of the specified name as
part of the current compilation. If --pch (automatic PCH mode) or --create_pch
appears on the command line following this option, its effect is erased.
--pch_dir directory-name The directory in which to search for and/or create a
precompiled header file. This option may be used with automatic PCH mode
(--pch) or with manual PCH mode (--create_pch or --use_pch).
--pch_messages
--no_pch_messages Enable or disable the display of a message indicating that a
precompiled header file was created or used in the current compilation.
--pch_mem size The number of 1024-byte units of preallocated memory in which
to save precompiled-header state (for platforms where we have chosen not to
use memory mapping or where it was not reasonably available). Contact us if
you feel that you need to use this option.
--------------------------------
I couldn't quite use that syntax. To create a precompiled header I needed a
dummy .cpp file:
#include "std.hpp"
int main()
{
}
Then I create the file by
como --dinkumware --create_pch=std.pch std.cpp
(notice "=")
Then I use the file as
como --dinkumware --use_pch=std.pch vector_string.cpp
Having a standard directory for the pch-files is probably a good idea. In that
case add --pch_dir=<dir>.
hope it helps
br
Thorsten
begin 666 std.hpp
M(VEF;F1E9B!"3T]35%]35$1?2%!0#0HC9&5F:6YE($)/3U-47U-41%](4% -
M"@T*(VEN8VQU9&4@/&%L9V]R:71H;3X-"B-I;F-L=61E(#QB:71S970^#0HC
M:6YC;'5D92 \8V%S<V5R=#X-"B-I;F-L=61E(#QC8W1Y<&4^#0HC:6YC;'5D
M92 \8V5R<FYO/@T*(VEN8VQU9&4@/&-F;&]A=#X-"B-I;F-L=61E(#QC:7-O
M-C0V/@T*(VEN8VQU9&4@/&-L:6UI=',^#0HC:6YC;'5D92 \8VQO8V%L93X-
M"B-I;F-L=61E(#QC;6%T:#X-"B-I;F-L=61E(#QC;VUP;&5X/@T*(VEN8VQU
M9&4@/&-S971J;7 ^#0HC:6YC;'5D92 \8W-I9VYA;#X-"B-I;F-L=61E(#QC
M<W1D87)G/@T*(VEN8VQU9&4@/&-S=&1D968^#0HC:6YC;'5D92 \8W-T9&EO
M/@T*(VEN8VQU9&4@/&-S=&1L:6(^#0HC:6YC;'5D92 \8W-T<FEN9SX-"B-I
M;F-L=61E(#QC=&EM93X-"B-I;F-L=61E(#QC=V-H87(^#0HC:6YC;'5D92 \
M8W=C='EP93X-"B-I;F-L=61E(#QD97%U93X-"B-I;F-L=61E(#QE>&-E<'1I
M;VX^#0HC:6YC;'5D92 \9G-T<F5A;3X-"B-I;F-L=61E(#QF=6YC=&EO;F%L
M/@T*+R\C:6YC;'5D92 \:&%S:%]M87 ^#0HO+R-I;F-L=61E(#QH87-H7W-E
M=#X-"B-I;F-L=61E(#QI;VUA;FEP/@T*(VEN8VQU9&4@/&EO<V9W9#X-"B-I
M;F-L=61E(#QI;W-T<F5A;3X-"B-I;F-L=61E(#QI<W1R96%M/@T*(VEN8VQU
M9&4@/&ET97)A=&]R/@T*(VEN8VQU9&4@/&QI;6ET<SX-"B-I;F-L=61E(#QL
M:7-T/@T*(VEN8VQU9&4@/&QO8V%L93X-"B-I;F-L=61E(#QM87 ^#0HC:6YC
M;'5D92 \;65M;W)Y/@T*(VEN8VQU9&4@/&YE=SX-"B-I;F-L=61E(#QN=6UE
M<FEC/@T*(VEN8VQU9&4@/&]S=')E86T^#0HC:6YC;'5D92 \<75E=64^#0HO
M+R-I;F-L=61E(#QR;W!E/@T*(VEN8VQU9&4@/'-E=#X-"B\O(VEN8VQU9&4@
M/'-L:7-T/@T*(VEN8VQU9&4@/'-S=')E86T^#0HC:6YC;'5D92 \<W1A8VL^
M#0HC:6YC;'5D92 \<W1D97AC97!T/@T*(VEN8VQU9&4@/'-T<F5A;6)U9CX-
M"B-I;F-L=61E(#QS=')I;F<^#0HC:6YC;'5D92 \<W1R<W1R96%M/@T*(VEN
M8VQU9&4@/'1Y<&5I;F9O/@T*(VEN8VQU9&4@/'5T:6QI='D^#0HC:6YC;'5D
K92 \=F%L87)R87D^#0HC:6YC;'5D92 \=F5C=&]R/@T*#0HC96YD:68-"@``
`
end
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