Opened 11 years ago

Last modified 11 years ago

#10 new enhancement

Precompiled headers

Reported by: dirk Owned by: dirk
Priority: major Milestone: 2.0 Release
Component: Build Version: 2.0
Keywords: Cc:


We need support for precompiled headers, both in the build system and for user apps.

Change History (1)

comment:1 Changed 11 years ago by marcusl

I did some experiments today, and found that even by using _both_ precompiled headers and "normal" inclusions, compiletimes where speed up *greatly*. This is because of the include guards.

I think that could work as a sort of middle ground. It will be a great improvement _now_ for compilers that support it and it will still be backwards compatible. Futurewise, we could move to add external guards to some files that we know are precompiled.

Some .h/.cpp:


#include <iostream>

#include <map>

#include <OSGBaseFoo.H>


Note that we have to #include the PCH-file in _all_ cpp libs, topmost. And we have to use include guards in that file, because visual studio assumes everything up to and including the #include-statement is in the pch. So an #endif isn't allowed afterwards.



#include ...


Note: See TracTickets for help on using tickets.