[cfe-dev] Precompiled header without prefix header ?
Fabien Sanglard
fabiensanglard.net at gmail.com
Wed Mar 20 07:24:10 PDT 2013
So the documentation at (
http://clang.llvm.org/docs/UsersManual.html#usersmanual-precompiled-headers)
should be disregarded ?
Fabien
On Mon, Mar 18, 2013 at 9:41 PM, Argyrios Kyrtzidis <akyrtzi at gmail.com>wrote:
> On Mar 18, 2013, at 12:44 PM, fab <fabiensanglard.net at gmail.com> wrote:
>
> I am working on a cross-platform codebase on Clang/MacOS X that is also
> compiled with Visual Studio on Windows and GCC on Linux.
>
> The source code headers always include "precomp_common.h" at the top of
> each
> header files. But according to the Clang documentation
> (
> http://clang.llvm.org/docs/UsersManual.html#usersmanual-precompiled-headers
> )
> Clang will NOT use the PCH in this case and no speed up will be performed
> since it was not include via "- include".
>
> Using Clang it seems the only way is to perform a conditional include:
>
> 1.
> #ifndef __clang__
> #include "precomp_common.h"
> #endif
>
> 2. Add "precomp_common.h" to the prefix header via -include option.
>
>
> You don't need to do 1.; by doing 2. the "#include "precomp_common.h" will
> just be skipped.
>
>
> I wonder if there is a "cleaner" way to do it.
>
>
>
> --
> View this message in context:
> http://clang-developers.42468.n3.nabble.com/Precompiled-header-without-prefix-header-tp4031029.html
> Sent from the Clang Developers mailing list archive at Nabble.com<http://nabble.com/>
> .
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130320/8e084fb3/attachment.html>
More information about the cfe-dev
mailing list