[C++-sig] Pyste suggestion: MSVC precompiled headers support

Niall Douglas s_sourceforge at nedprod.com
Tue Oct 7 01:09:20 CEST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6 Oct 2003 at 15:58, Nicodemus wrote:

> >#ifdef _MSC_VER
> >#pragma hdrstop
> >#endif
> >
> >This won't affect GCC, but it means on MSVC you can precompile the
> >common section (eg; boost/python.hpp) and it no longer needs to be
> >done repeatedly per file.
> 
> It is in CVS now (it only writes the pragma and the surrounding #ifdef
> on windows systems).

How did you separate the two sets of header files?

There will be a few eg; boost/python.hpp which will be common to all 
source files. These can be precompiled.

There will however be other specified by Include() which are in some 
and not others. These would be "forgotten" by MSVC if they appear 
before the #pragma hdrstop.

I would suggest Include() for per-file includes and CommonInclude() 
for the cross-module includes. Then even better you can have your 
converter registering modules (I call mine _regconvs) generate your 
precompiled headers for you which saves another ten seconds :)

(BTW I've not forgotten the C array access class, right now I'm 
getting to grips with scons (python based make system) so I can 
finally compile two files at once and use all my processor space).

Cheers,
Niall





-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2

iQA/AwUBP4H2IMEcvDLFGKbPEQJDOgCfbnXBCVqhEOKqk+zoDsizEUN8yKYAoKVb
Y8AbpXbmGd+lr1YjKc4MIjcW
=fm4o
-----END PGP SIGNATURE-----




More information about the Cplusplus-sig mailing list