Boost logo

Boost-Build :

From: Jim Tilander (jim.tilander_at_[hidden])
Date: 2005-07-06 10:24:45


Vladimir,

The automatic mode in visual studio is basically useless, it's often slower
than compiling without a precompiled header. I think MS recommends not to
use it at all. The crazy part is that it's the default behaviour if you
create a new project with a wizard in visual :) I'll take a look at how to
add the precompiled header stuff to msvc.jam, the manual version of it.

I'm also curious, does anyone actually use the #pragma hdrstop? I've never
seen any real use for it, but I'm probably missing something here since it
seems to spring up...

/j

On 7/6/05, Vladimir Prus <ghost_at_[hidden]> wrote:
>
> Hi Andrey,
> Hi Jim,
>
> > > 2. In my compiler flags <cflag> I'd like to reference the output
> > > directory (the one we changed in 1). This is for this specific
> instance
> > > for precompiled headers, so the actual flag I want to pass is
> something
> > > like this (but of course I don't know the proper variablenames):
> > >
> > > <cflag>-Fp$(intermediate_path)/$(project_name).pch
> >
> > It isn't a good idea to specify cflags manually in jamfile. It's better
> > to patch msvc.jam toolset definition file and create features like
> >
> > <pch>off|use|create|hdrstop
> > <pch-header>StdAfx.h
> > <pch-db>StdAfx.pch
> >
> > Also you need to track dependencies correctly: all files with <pch>use
> > should depend on StdAfx.pch, and stdafx.cpp should create StdAfx.pch
> > output.
> >
> > Can someone more fluent in bbv2 tell me is this a lot of work?
>
> This PCH thing becomes a common request. Recall that msvc has both
> "automatic"
> pch mode, that requires, IIRC, a single switch, and "manual" mode, that
> requires creating PCH once, and then using it from other targets. I recall
>
> I've suggested the following syntax for the manual mode:
>
> pch stl : stl.h :
> exe my : my.cpp : <pch>stl ;
>
> I think this should not be too hard to add.
>
> > Also I wonder how other compilers besides msvc implement precompiler
> > headers?
>
> borland, como, gcc
>
> > It looks like bcb can use #pragma hdrstop too.
>
> And, BTW, I forgot that #pragma hdrstop does ;-) Gcc does not have it,
> IIRC.
>
> - Volodya
>
> --
> Vladimir Prus
> http://vladimir_prus.blogspot.com
> Boost.Build V2: http://boost.org/boost-build2
>
> ------------------------------
> YAHOO! GROUPS LINKS
>
>
> - Visit your group "jamboost<http://groups.yahoo.com/group/jamboost>"
> on the web.
> - To unsubscribe from this group, send an email to:
> jamboost-unsubscribe_at_[hidden]<jamboost-unsubscribe_at_[hidden]?subject=Unsubscribe>
> - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------
>
 ------=_Part_17888_515174.1120663485281 Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Vladimir,<br>
<br>
The automatic mode in visual studio is basically useless, it's often
slower than compiling without a precompiled header. I think MS
recommends not to use it at all. The crazy part is that it's the
default behaviour if you create a new project with a wizard in visual
:) I'll take a look at how to add the precompiled header stuff to
msvc.jam, the manual version of it.<br>
<br>
I'm also curious, does anyone actually use the #pragma hdrstop? I've
never seen any real use for it, but I'm probably missing something here
since it seems to spring up...<br>
<br>
/j<br><br><div><span class="gmail_quote">On 7/6/05, <b class="gmail_sendername">Vladimir Prus</b> &lt;<a href="mailto:ghost_at_[hidden]">ghost_at_[hidden]</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<tt>
Hi Andrey,<br>
Hi Jim,<span class="q"><br>
<br>
&gt; &gt; 2. In my compiler flags &lt;cflag&gt; I'd like to reference the output<br>
&gt; &gt; directory (the one we changed in 1). This is for this specific instance<br>
&gt; &gt; for precompiled headers, so the actual flag I want to pass is something<br>
&gt; &gt; like this (but of course I don't know the proper variablenames):<br>
&gt; &gt;<br>
&gt; &gt; &lt;cflag&gt;-Fp$(intermediate_path)/$(project_name).pch<br>
&gt;<br>
&gt; It isn't a good idea to specify cflags manually in jamfile. It's better<br>
&gt; to patch msvc.jam toolset definition file and create features like<br>
&gt;<br>
&gt; &lt;pch&gt;off|use|create|hdrstop<br>
&gt; &lt;pch-header&gt;StdAfx.h<br>
&gt; &lt;pch-db&gt;StdAfx.pch<br>
&gt;<br>
&gt; Also you need to track dependencies correctly: all files with &lt;pch&gt;use<br>
&gt; should depend on StdAfx.pch, and stdafx.cpp should create StdAfx.pch<br>
&gt; output.<br>
&gt;<br>
&gt; Can someone more fluent in bbv2 tell me is this a lot of work?<br>
<br></span>
This PCH thing becomes a common request. Recall that msvc has both &quot;automatic&quot; <br>
pch mode, that requires, IIRC, a single switch, and &quot;manual&quot; mode, that <br>
requires creating PCH once, and then using it from other targets. I recall <br>
I've suggested the following syntax for the manual mode:<br>
<br>
&nbsp; pch stl : stl.h :<br>
&nbsp; exe my : my.cpp : &lt;pch&gt;stl ;<br>
<br>
I think this should not be too hard to add. <span class="q"><br>
<br>
&gt; Also I wonder how other compilers besides msvc implement precompiler<br>
&gt; headers? <br>
<br></span>
borland, como, gcc<span class="q"><br>
<br>
&gt; It looks like bcb can use #pragma hdrstop too. <br>
<br></span>
And, BTW, I forgot that #pragma hdrstop does ;-) Gcc does not have it, IIRC.<br>
<br>
- Volodya<br>
<br>
-- <br><span class="sg">
Vladimir Prus<br>
<a href="http://vladimir_prus.blogspot.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://vladimir_prus.blogspot.com><br>
Boost.Build V2:
http://boost.org/boost-build2<br>
</span></tt><div><span class="e" id="q_104ecaf340b43316_9">

  
  

<br>
<div style="text-align: center; color: rgb(144, 144, 144); width: 500px;">
<hr style="border-bottom: 1px none; width: 500px; text-align: left;">
<tt>YAHOO! GROUPS LINKS</tt>
</div>
<br>
<ul>
<tt><li type="square">&nbsp;Visit your group &quot;jamboost&quot; on the web.<br>&nbsp;</li></tt>
<tt><li type="square">&nbsp;To unsubscribe from this group, send an email to:<br>&nbsp;<a href="mailto:jamboost-unsubscribe_at_[hidden]?subject=Unsubscribe" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
jamboost-unsubscribe_at_[hidden]</a><br>&nbsp;</li></tt>
<tt><li type="square">&nbsp;Your use of Yahoo! Groups is subject to theYahoo! Terms of Service.</li></tt>

</ul>
<br>
<div style="text-align: center; color: rgb(144, 144, 144); width: 500px;">
<hr style="border-bottom: 1px none; width: 500px; text-align: left;">
</div>

</span></div></blockquote></div><br>
 ------=_Part_17888_515174.1120663485281--


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