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

Daniel Pfeifer daniel at pfeifer-mail.de
Wed Oct 28 04:57:23 EDT 2015


On Tue, Oct 27, 2015 at 3:53 AM, Taylor Braun-Jones
<taylor at braun-jones.org> wrote:
> What's the status of this PCH feature? Does it need testers? More design
> input? I'd love to see this feature in a future CMake release. Willing to
> help.

I haven't worked on it for quite some time as I currently don't have a
project which needs it.
But I agree that we should get it into CMake, even if it does not
support all generators yet.
Support for additional generators can be added successively.

I will rebase my branch to master on the weekend, ie port it to
cmGeneratorTarget.
Then you are free to help with review, testing, and additional generators.

Which generators are the most important for you?

-- Daniel

> Cheers,
> Taylor
>
> On Fri, Mar 20, 2015 at 3:56 PM, Daniel Pfeifer <daniel at pfeifer-mail.de>
> wrote:
>>
>> 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
>> --
>>
>> Powered by www.kitware.com
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/cmake-developers
>
>


More information about the cmake-developers mailing list