Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-11-17 06:53:49


Vladimir Prus wrote:
> > msvc.compile.c++ ..\..\..\build\tools\pch\msvc-7.1\release\main.obj
> > main.cpp
> > main.cpp(1) : fatal error C1083: Cannot open precompiled header file:
> > 'pch.pch':
> > No such file or directory
> >
> > 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\pch\msvc-7.1\release\main.obj.rsp" -c
> > -Fo"..\..\..\build\tools\pch\msvc-7.1\release\main.obj" -Yu"pch.hpp"
>
>So, there's no -Fp option here.

No.

>And your generator is:
>
> generators.register
> [ new pch-generator msvc.compile.pch : HPP : OBJ PCH : <toolset>msvc ]
>;

Yes.

>and you action is:
>
> actions compile.pch
> {
> $(.CC) /Zm800 -nologo -TP -U$(UNDEFS) $(CFLAGS) $(C++FLAGS)
>$(USER_CFLAGS)
> @"@($(<[1]:W).rsp:E=$(nl)"$(>[1])" $(nl)-D$(DEFINES)
> $(nl)"-I$(INCLUDES)")" -c -Fo"$(<[1])" -Yc"$(>[2])" -Fp"$(<[2])"
> }
>
>which includes -Fp"$(<[2])" but it's not taking effect? Wierd. Try adding

The compile.pch action works fine.

The problem is that I want to pass the -Fp"..." option to the *compile.c++*
actions, like I am passing the mypch.hpp! So, what I want to do is get the
name of the PCH target when in the pch-generator and add it to the
properties via <use-pch-header>, but I don't have the target name there :(.

Am I making sense?

Essentially, I have something like

   HPP --> [pch] --> PCH + OBJ
   (CPP) ---/

and

   pch(source:HPP) --\
               CPP --> [cpp] --> OBJ
   pch(target:PCH) --/
   ^^^^^^^^^^ --- how do I do this??

- 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