Skip to content

enh(build): enable support of PCH in unit tests

Flavien BRIDAULT requested to merge 681-unit-tests-do-not-build-with-pch into dev

Description

Sight CMake targets of type TEST now build with precompiled headers, which speed-ups a bit the global build time.

Closes #681 (closed)

How to test it?

Just build.

Some results

Tested on Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz

Type Compiler Before After
Debug Clang 7114,74s user 364,20s system 1143% cpu 10:54,28 total 6193,87s user 333,44s system 1142% cpu 9:31,27 total
Debug GCC 9204,07s user 691,77s system 1109% cpu 14:51,56 total ninja 9044,10s user 717,83s system 1126% cpu 14:26,53 total
Release Clang 12294,12s user 383,51s system 1158% cpu 18:14,47 total 10121,28s user 316,13s system 1148% cpu 15:09,08 total
Release GCC 12232,54s user 575,74s system 1150% cpu 18:32,94 total 10935,45s user 515,11s system 1130% cpu 16:53,16 total
Edited by Flavien BRIDAULT

Merge request reports