[cmake-developers] RFC: CMake precompiled header support and custom compiler based implementation

Daniel Pfeifer daniel at pfeifer-mail.de
Fri Mar 20 15:56:36 EDT 2015


On Fri, Mar 20, 2015 at 6:35 PM, Amine Khaldi <amine.khaldi at reactos.org> wrote:
> Two requests please:
>
> * The option to use existing headers instead of autogenerated ones.

That is an implementation detail. It should not make a difference
whether the precompiled header is used through your existing header or
through an autogenerated header that forward includes your existing
header. This forward inclusion is important at least for GCC: The
compiler searches for a .gch file in the same directory as the header
file. Since we do not want this .gch file to be generated in the
source directory for out-of-source builds, we need to put the header
file into the build directory.

Did I misunderstand your request and you meant "use an existing
*precompiled* header", ie. provide a .pch or .gch file?
My approach currently does not support that. Please let me know if
that is what you meant.

> * Implementing PCH support without additional targets. ReactOS already has like 1000+ targets, and we currently use PCH on almost all of them, so imagine if this official implementation doubles our targets number.

I completely agree.

One request that I can add:

* It shall be visible in the IDE's settings that precompiled headers are used.

Cheers, Daniel


More information about the cmake-developers mailing list