Re: [gtkmm] precompiled headers [revisited]



Cristian Adam wrote:

The compilation was ~6 (six) times faster with precompiled headers!!!

Precompiled headers rulle!!!


OK - I'm seeing similar results now (even with more complex examples - about 4 times faster). I guess my problem was that the precompiled header should be named gtkmm.h.gch and not gtkmm.gch. However, I quickly stumbled across GCC bug 13675 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13675), which was rather easily worked around by using 2 include files like:

A.h:
#ifndef A_INCLUDED
#define A_INCLUDED
#include "B.h"
#endif

B.h:
#include <gtkmm.h>

and then precompiling B.h, while including A.h in my source files. So it seems that it's not quite ready for prime time yet, but I still think it'd be rather interesting to have a build target for gtkmm.h.pch in the standard gtkmm makefile.

--
Christer Palm



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]