Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-11-18 05:53:53

Juergen Hunold wrote:
> On Friday 18 November 2005 10:13, Reece Dunn wrote:
>> Juergen Hunold wrote:
>>> On Thursday 17 November 2005 23:15, Reece Dunn wrote:
>>> The query is: How do I get a command line _without_ the -Fp
>>> switches in order to compile _without_ pch's ?
>> You don't need the -Fp switches. You would have something like:
> Oh, misunderstanding here. What I meant was:
> How do I disable pch completly.
> Or: How to get the old, much simpler commandlines back again when not
> using pchs ?
> When pchs are disabled, I'd like the compiler not to use _any_ , even
> fake pch's.

It won't. Or at least it shouldn't. If you have:

    exe nopch : a.cpp b.cpp ;

the PCH_*** variables will be empty, so -Fp"$(PCH_FILE)" will disappear.
If it doesn't in your case, shout! Compiling a project like this (no PCH
) gives:

     call "C:\Program Files\Microsoft Visual Studio .NET
2003\vc7\bin\vcvars32.bat" >nul
cl /Zm800 -nologo -TP /O2 /Ob2 /W4 /GR /MD /DWIN32 /DX86 /D_X86_
/Zc:forScope /Zc:wchar_t /Wp64 /Ogiy /Gs /Ot /GB /wd4675 /EHs
@"..\..\..\build\tools\hex\msvc-7.1\release\main.obj.rsp" -c

Same goes for using <pch>off with source files in a pch environment.

> This means, I don't want any mention of pch on the commandline when they
> are disabled.

They won't. See above.

> I think this is a key requirement and one of the results of the past
> dicscusions about pch files.

Sure. I misunderstood your original reply. I thought you were trying to
make the -Fp switch disappear on GCC and not msvc.

> Unfortunately, this seems to be the hardest part of the issue as you
> must somehow switch between pch and non-pch in <toolset>.jam...

I have a <pch> option (default on) that will enable PCHs when compiling
with a pch in the sources. If <pch>off is present, or there is no pch in
the sources, PCHs won't be used.

That's the easy part :). The hardest part was to translate that into
msvc options!

> Well, I got gcc to create the pch file. But I doubt that gcc will take
> an empty file and create an empty pch file.
> I'll hack a few tests for this ....

Cool. I don't know much about using GCC (and how PCHs work witrh it) so
your help is appreciated.

- Reece

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