From: Dean M. B. <mik...@gm...> - 2010-10-27 02:59:39
|
On Tue, Oct 26, 2010 at 11:50 PM, Nelson, Erik - 2 <eri...@ba...> wrote: >>Dean Michael Berris wrote: >>The long compile times can really be addressed by precompiled headers >>especially if you're using GCC. Clang, well not so much because >>precompiled headers support is still a little ... well... iffy at this >>time. :D > > Does gcc have any requirements on the usage of precompiled headers? I > thought I remembered that no compilable code could appear before the > precompiled header, which seems like it could lead to strange > requirements like 'cpp-netlib headers need to be included first in a > file' in order to get the pch benefit. > Well, there's also the single PCH per compilation unit requirement. This would be perfect for 'boost/network/include/http/client.hpp' and similar files. http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html explains it in great detail. For the most part, these are easy -- and actually painless -- to follow in case you really want to get the advantage of PCH. Otherwise, that's not really a big burden having PCHs around if they're just there to help -- I mean, if they aren't used, the normal headers are used. > I might be mistaken, just wanted to bring it up. No worries. Thanks for bringing it up. :) > > Clang you don't have to worry about, since it's so fast already, right? > ;) > Hah! Touche. :) -- Dean Michael Berris deanberris.com |