Antares_Simulator
Antares_Simulator copied to clipboard
Testing precompiled headers
This is a test of cmake precompiled headers feature, to assess the possible benefit for the project, through build time improvements.
why Clang build time analysis shows that a large amount of time (400s), is spent in the parsing of study.h header.
Here, we configure cmake to pre-compile only this header.
Consequences Cmake works by including this header in all dependent translation units. This can have unwanted effect, like conflicting symbols that dit not cause any problem before.
Interactions with caching A problem with precompiled headers is that compiler caches don't work well with it. See stats from windows workflow:
Cacheable calls: 84 / 796 (10.55%)
Hits: 20 / 84 (23.81%)
Direct: 19 / 20 (95.00%)
Preprocessed: 1 / 20 ( 5.00%)
Misses: 64 / 84 (76.19%)
Uncacheable calls: 712 / 796 (89.45%)
Most calls are now uncacheable. This makes the use of precompiled headers probably not worth it for use in CI.