calband/calchart — pull request #99 by kmdurand (2014-07-27 23:22:59+00:00)
Title: Windows Precompiled Headers

So this was a really cool learning experience. Didn't know anything about this until working on this issue. But now compiling is super fast - this is pretty awesome.

precomp.h becomes a precompiled header - it precompiles not only wx\prec.h, but also some standard header files (like and such) and some wxWidgets includes that are not in wx\wxprec.h

precomp.cpp is the source file used to build the precompiled header

unfortunately, in microsoft visual studio, if you set the project to use precompiled headers, then every single source file must include that precompiled header (that is: #include "precomp.h"), and cannot include the precompiled header through one of its includes. even if a source file didn't use anything from the header, it would need to include it.
there is an option to turn off precompiled headers for individual source files, but that's a little more tedious than just tagging a #include to the top of every new source file (especially when mac users commit new source files, since they can't use microsoft visual studio to change the settings)

Also!
regarding how this will effect the mac...
i think that either precomp.h should be made the precompiled header on the mac as well, or we should use #ifdefs to make sure that "precomp.h" is only included on windows. otherwise, source files may include a whole bunch of unnecessary files on the mac