Boost logo

Boost-Build :

From: Bojan Resnik (resnikb_at_[hidden])
Date: 2005-12-15 09:27:13

2005/12/12, Bojan Resnik <resnikb_at_[hidden]>:
> > I have not had chance to look into this in depth yet, but the workaround
> > to your issue would be to add the arguments to the pch target as well:
> >
> > exe e : ep e.cpp : <cxxflags>/vmg ;
> > pch ep : [ cast _ pcheader : ep.hpp ] ep.cpp : <cxxflags>/vmg ;
> >
> > - Reece
> This would work if the requirements were to be explicitly specified
> for the main target. However, the real problem is with inhertied usage
> requirements of another target. An example that is closer to what I
> have now would be:

  It turns out this doesn't work as expected. The problem is that
<cxxflags> do not take effect with pch targets. The following Jamfile
demonstrates this:

import cast ;
local req = <define>DEF <cxxflags>FLAG ;

exe e : ep e.cpp : $(req) ;
pch ep : [ cast _ pcheader : ep.hpp ] ep.cpp : $(req) ;

The define is correctly placed in the response file for both exe and
pch targets, but the FLAG string appears only with the exe target, and
not with pch.

Command lines:

    call "D:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT" >nul
cl /Zm800 -nologo -TP /Z7 /Od /Ob0 /W4 /GR /MDd /GB /EHs
@"bin\msvc-6\debug\ep.obj.rsp" -c -Fo"bin\msvc-6\debug\ep.obj"
/Yc"ep.hpp" /Yl__bjam_pch_symbol -Fp"bin\msvc-6\debug\ep.pch"

    call "D:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT" >nul
cl /Zm800 -nologo -TP /Z7 /Od /Ob0 /W4 /GR /MDd /GB /EHs FLAG
@"bin\msvc-6\debug\e.obj.rsp" -c -Fo"bin\msvc-6\debug\e.obj"
-Yu"ep.hpp" -Fp"bin\msvc-6\debug\ep.pch"

Bojan Resnik

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