Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-09-23 03:27:55


Vladimir Prus wrote:
> On Thursday 15 September 2005 10:54, Reece Dunn wrote:
>
>>>When we talked about it before, the general agreement was to never use
>>>automatic pch, but instead use manual mode. MSVC users said it's much
>>>more reliable.

Precompiled headers are implemented in different ways on different
toolsets. It would be a good idea to collate this information for all
the toolsets. I have started with msvc and cw, although I'm not sure how
the options on CodeWarrior are used. We can then work out how to
implement PCH support.

-- pch.jam --

rule pch ( name : header : source ? )
{
# How do we implement this??
}

feature pch : # control precompiled header (PCH) generation
on # this file has support for using PCHs (if available)
off # this file doesn't use PCHs
;

# We have the ability to create, use and not use PCH files. That is:
#
# *.cpp/<pch>off -- don't use PCH
# *.cpp/<pch>on -- use PCH, if supported by the compiler
# pch pchdr : pch.hpp ; -- create PCH from pch.hpp

-- msvc.jam --

default options
don't use precompile headers
-Yu"<file>"
use PCH; <file> is the *.h[pp] file used to generate the PCH file
-Yc"<file>"
create PCH; <file> is the *.h[pp] file used to generate the PCH file
-Fp"<pch-file>"
<pch-file> is the generated PCH file; used with both -Yu and -Yc

-- cw.jam --

-noprecompile
do not precompile any files based on the filename extension
-precompile file|dir
generate precompiled header from source; write header to 'file' if
specified, or
put header in 'dir'; if argument is "", write header to
source-specified location;
if neither is defined, header filename is derived from source
filename; note: the
driver can tell whether to precompile a file based on its extension;
'-precompile
file source' then is the same as '-c -o file source'

- Reece

 


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