mirror of
https://github.com/OpenMW/openmw.git
synced 2026-01-24 19:00:55 +00:00
Precompiled headers avoid duplicate work. If you've only got a single TU using a particular PCH, then there's no duplicate work, so it can only add overhead. We don't need to totally abandon PCHs for these targets, though, as CMake lets us reuse the PCH from components. If you've only got a few TUs in a target, it's *probably* faster to get components' PCH for free and eat the cost of it not being perfect than it is to make a perfect PCH from scratch. Note that I don't know if there are drawbacks due to components having a couple of private precompiled headers that wouldn't have otherwise propagated or these targets having different build flags. I can't test it locally right now as my linker's regained the deadlocking issue it had the other day. If it turns out there are problems, then for the single-TU targets, simply avoiding using PCHs for them at all will still be an improvement over the status quo. For the two-or-three TU targets, we'll have to actually measure things. |
||
|---|---|---|
| .. | ||
| model/world | ||
| CMakeLists.txt | ||
| main.cpp | ||