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:
- add a .cpp and a .h to the project (Precompiled.h and Precompiled.cpp for 
instance).
- say the .cpp generation also generates the precompiled header (command line 
for the cpp)
- say everything else in the project use this precompiled header (command line 
for the project)
- force each cpp in the project to virtually include the Precompiled.h (command 
line for the project)

Cheers,

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

----- "Jan Ciger" <[email protected]> a écrit :

> -----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 details: - AFAIK, if you put only STL (and
> system
> > headers?) in the PCH, you can avoid having to recompile the wholeH
> > project each time you change osg/Node. The speedup is of course
> less,
> > but it compensates a bit the slowness of MSVC. - The ".h" is
> > automatically added to all .cpp files without having to change them
> > (command line arg given in CMakeLists.txt). No special maintenance
> is
> > to be made here. - However, you still got the thing I described in
> > the previous mail: MSVC submitters must be warned to build without
> > PCH before submitting.
> 
> BTW, you are aware that GCC has precompiled headers support too for
> some
> time? It would be nice to have that supported as well.
> 
> Regards,
> 
> Jan
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iD8DBQFLUKVin11XseNj94gRAiZzAJwMcDgwndMrD69F5MNB8FzK7eyphgCfRief
> PSG1vqKN8Bnsw+eYaDKrMV0=
> =1Gwb
> -----END PGP SIGNATURE-----
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to