[ros-dev] 52061 [jgardou] [CMAKE], "According to gcc doc, if header.h is precompiled, the output should be named "header.h.gch" and not anything else.", Knowing it was the first step before actually doing it :-/

Jérôme Gardou jerome.gardou at laposte.net
Thu Jun 2 21:36:48 UTC 2011


no, _basename is with .h here.

as for the other problem, it's the case. For now gcc falls back to using 
non precompiled header. But I have other plans, this is just a quick and 
dirty little thing.
cmake team will have some patches to deal with in weeks to come :-)

Le 02/06/2011 22:42, Colin Finck a écrit :
>
> jgardou at svn.reactos.org wrote:
> > -  set(_gch_filename "${_target_name}_${_FILE}.gch")
> > +  set(_gch_filename "${_FILE}.gch")
>
> Looks like we're going through the same mess of GNU precompiled 
> headers, which we already had in rbuild:
>
> 1) Giving the GCH file a custom name.
>    Problem: It is simply ignored in the build process.
> 2) Just renaming it to the name of the header file.
>    Problem: If two modules use the same header file with different
>    build options (like #defines), the compiler can only choose one
>    precompiled header and we have a corrupted build.
>
> The solution now is to give every GCH file an individual directory 
> whose name contains the module name (like ".gch_smlib", this is what 
> we currently have in rbuild).
>
> Concluding from what I see in rbuild, please also note that the GCH 
> file needs to be named "header.h.gch", not "header.gch". Your 
> ${basename} variable sounds like this is not done either in the CMake 
> branch.
>
>
> - Colin
>
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
>





More information about the Ros-dev mailing list