[Cmake] Precompiled headers with VC++

Miller, James V (CRD) millerjv at crd.ge.com
Thu Feb 21 10:55:07 EST 2002


Why put the pch files into CVS at all?

Should the build process automatically create these? If a user
wants to use pch files, they would be generated on their system 
for their use. We would create one/several include files that 
would be transformed into a precompiled header.

What about other systems/compilers?  MSDev is not the only system
that supports precompiled headers.  If we are going to support 
precompiled headers, we devise a plan that would allow other
compilers to take advantage of it.  (All the more reason
not to include the pch file in CVS).

An additional thing to be careful of: the Intel C++ compiler
seems to have a lot of problems with dependencies (and if
I recall properly, precompiled headers).  I have had a series
of problems with things not building correctly with the Intel C++
compiler and have to resort to doing cleans.  Rather suprising 
for something that is supposed to be a drop in replacement
for VC++.




-----Original Message-----
From: Sebastien BARRE [mailto:sebastien.barre at kitware.com]
Sent: Thursday, February 21, 2002 10:15 AM
To: Lorensen, William E (CRD)
Cc: John Biddiscombe; Alexander Fiksel; cmake at public.kitware.com
Subject: RE: [Cmake] Precompiled headers with VC++


At 2/21/2002 10:07 AM, Lorensen, William E (CRD) wrote:
>Please do not require perl to build vtk or itk.

Perl is your friend. Perl has been ported almost everywhere. You shall not 
fear Perl :)

More seriously, Perl is not required here: this special header file listing 
the most dependent VTK header files could be generated from time to time 
manually or by a cron job and put/updated in the CVS.

I guess I should checkout a VTK tree and create a Perl script to add the 
following code to the beginning of each .cxx file (yes, it *has* to be at 
the beginning of a *cxx* file, before all other #include). Then compile the 
tree and check the compilation time. Then play with it a week or a month to 
see how it behaves...

#ifdef USE_PCH
#  ifdef _MSC_VER
#    include "vtksbPrecompiledHeaders.h"
#    pragma hdrstop
#  endif
#endif

(of course the name of the file can be changed, it was chosen to comply 
with my vtksb lib).



--
Sebastien Barre

_______________________________________________
Cmake mailing list
Cmake at public.kitware.com
http://public.kitware.com/mailman/listinfo/cmake



More information about the CMake mailing list