PointCloudLibrary/pcl

[cmake] Adding support for PCH and Unity builds (using Cotire/CMake 3.16)

Open

#649 aperta il 19 apr 2014

Vedi su GitHub
 (13 commenti) (0 reazioni) (0 assegnatari)C++ (4506 fork)batch import
help wantedkind: todomodule: cmakeskill: cmake

Metriche repository

Star
 (9023 star)
Metriche merge PR
 (Merge medio 8g 7h) (3 PR mergiate in 30 g)

Descrizione

Have a look at https://github.com/sakra/cotire, it can speed up the build of a CMake project with low effort (by using precompiled headers).

When compiling an example like the extract_indices tutorial, precompiled headers brought down my compile time from 6s to 1.8.

For this example, with g++ -H I found that it includes over 3900 header files. A precompiled header reduces that to 1.

Note that cotire doesn't seem to be able to share precompiled headers across files so far, so it might not be able to help when doing just a single full build once, but it seems like it can dramatically improve build speeds when developing.

The speedup [doesn't seem to work with clang] right now though.

Guida contributor