|
|
|
|
|
by int_19h
2724 days ago
|
|
There's no need for black arts for most. For most code out there, the headers that really blow up compilation times come from either the standard library, or from large third party libraries. A simple rule of thumb, therefore, is to simply shove all such headers into your precompiled header, and only ever #include the latter in your code. Simply put - if it's #include <...>, it goes into the precompiled header. Otherwise, it goes directly into the source. The downside of this is that every time you add a new dependency, the entire project is rebuilt, since the change in your precompiled header affects all translation units. But adding dependencies is rare, and changing code and rebuilding is far more common. |
|