[Cmake] Precompiled headers with VC++
Sebastien BARRE
sebastien.barre at kitware.com
Thu Feb 21 11:05:55 EST 2002
At 2/21/2002 10:55 AM, Miller, James V (CRD) wrote:
>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.
Sure.
I mean, Bill Lorensen does not want Perl :) So I suggested to include the
pch (here I guess you meant this special file header file that is going to
produce the real pch file) in the CVS. But of course another suggestion
would be to emulate this Perl script in a CMake command. Should be easy to
do. And then use that command to create this special pch.
If I remember correctly, Ken coded a nasty command called
OUTPUT_REQUIRED_FILES that could be used as a starting point.
>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.
We had this discussion in the past, where basically John Biddiscombe would
come with a solution for Borland and I'd come with a solution for MSDEV.
They should be easy to unite, if I remember correctly. Now for the other
compilers...
> (All the more reason
>not to include the pch file in CVS).
The pch file might not be the main pb. Another pb is that each CXX file has
to be updated to include the short piece of code I mentioned before. In the
past, people thought it was not worth it to include compiler-dependent
instructions in each CXX file. My opinion is that it's worth it :) Even if
we can not support all compilers, we can at least support the major ones
inside #ifdef directives.
--
Sebastien Barre
More information about the CMake
mailing list