Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-19 Thread Sukender
I thing getting PCHs in sync would be very easy. Moreover, I suggest that even the "highest level" of PCH only include headers frequently added, such as Node, Drawable, NodeCallback, and such (=not too specific ones). Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourcefor

Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-19 Thread Erik den Dekker
Different levels of PCH sounds like a good suggestion,... When I tried PCH on MSVC about a year ago I tried to take it to the max and included all used headers to the precompiled header; This gained the maximum performance for a single compile of the entire library,… The counter side being that

Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-19 Thread Sukender
Hi Erik, You're absolutely right. And what about three levels of PCHs? 1. Disable PCH 2. Enable PCH - Profile "OSG dev" (only standard includes) 3. Enable PCH - Profile "OSG user" (standard includes and base OSG ones, such as Node) It would require a few lines of CMake scripts. Cheers, Sukender

Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-19 Thread Erik den Dekker
IMHO precompiled headers are only useful if used on headers that do not or at most rarely change. That leaves little options for which headers to include: Including the standard C/C++ headers in a precompiled header is useful. These should not change anyways. The question if other headers chang

Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-18 Thread Ulrich Hertlein
On 19/01/10 15:21 , Martin Beckett wrote: > This causes an issue with ShadowVolumeOccluder which defines a std::pair > named Point, > but the precompiled header already includes an osg::Point. > ShadowVolumeOccluder has a > "using namespace osg" which leads to a clash. >... > Would it be a goo

Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-18 Thread Martin Beckett
I have been trying to build OSG 2.9.6 with precompiled headers. As a starting point I just included all the headers in "osg" This causes an issue with ShadowVolumeOccluder which defines a std::pair named Point, but the precompiled header already includes an osg::Point. ShadowVolumeOccluder has

Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-18 Thread Martin Beckett
Sorry - wasn't thinking. The PCH still has all the include guards, I was imagining having to put if USE_PCH wrappers around the include section in every cpp file. Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=22849#22849 _

Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-18 Thread Sukender
Le Mon, 18 Jan 2010 18:39:54 +0100, Martin Beckett a écrit: Sukender, would you not also have to remove all the "#include " from each cpp file for all the headers that are in the PCH? Otherwise doesn't Visual Studio just parse them again anyway? Martin -- Read this topic onl

Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-18 Thread Martin Beckett
Sukender, would you not also have to remove all the "#include " from each cpp file for all the headers that are in the PCH? Otherwise doesn't Visual Studio just parse them again anyway? Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=22832#

Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-18 Thread Sukender
Hi Jan, It could be nice if GCC also supports PCH. Well what I did looks like: if(enabled) if(msvc) add command line arguments to the compiler endif() endif() So adding support for any compiler is very straightforward as long as it behaves a bit the same: under MSVC, you need to:

Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-15 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2010-01-14 01:01, Sukender wrote: > Hi Paul, > > I'm sorry, I did a search IN MY MAIL BOX and didn't find anything... > but you're right, I should have searched the whole archives first! I do not recall seeing it neither. > > Well, to add a few

Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-14 Thread Erik den Dekker
Here is the original post you were referring to: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-August/015868.html Erik den Dekker On 14-01-2010, at 14:50, Paul Martz wrote: > Interesting. I can't find it either if I search for that subject, but a > search for "

Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-14 Thread Paul Martz
Interesting. I can't find it either if I search for that subject, but a search for "precompiled headers" does turn up a thread with that subject. I'm searching in the OSG-users Google Group. Paul Martz Skew Matrix Software LLC _http://www.skew-matrix.com_ +1 303 85

Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-13 Thread Sukender
Hi Paul, I'm sorry, I did a search IN MY MAIL BOX and didn't find anything... but you're right, I should have searched the whole archives first! Well, to add a few details: - AFAIK, if you put only STL (and system headers?) in the PCH, you can avoid having to recompile the whole project each ti

Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-13 Thread Sukender
Hi Martin, Yes of course this is what I did in CMake :) Simply add compiler a command line arg in CMakeLists.txt. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - "Martin Beckett" a écrit : > Rather than add stdafx.h to everything you can tell Visual

Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-13 Thread Paul Martz
The pros and cons of this was discussed not too long ago in the thread "Drastic build time speed-up using precompiled headers". Paul Martz Skew Matrix Software LLC _http://www.skew-matrix.com_ +1 303 859 9466 ___ osg-u

Re: [osg-users] Faster build with precompiled headers (PCH)?

2010-01-13 Thread Martin Beckett
Rather than add stdafx.h to everything you can tell Visual studio to insert it automatically Project properties -> Configuration->C++->Advanced and in the "Force includes" box put stdafx.h. Don't know if you can do this from the CMake file. Martin -- Read this topic online her

[osg-users] Faster build with precompiled headers (PCH)?

2010-01-13 Thread Sukender
Hi all, Should we add PCH support for OSG? MSVC is not the fastest compiler on earth, but has support for a precompiled headers (PCH) to compensate and speed up the build. I'm not here to debate about the design of PCH(*), but I must admit it could significantly decrease compile time under Win