PointCloudLibrary/pcl

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

開放

#649 建立於 2014年4月19日

 (13 則留言) (0 個反應) (0 位負責人)C++ (4,506 個分叉)batch import
help wantedkind: todomodule: cmakeskill: cmake

倉庫指標

星標
 (9,023 顆星)
PR 合併指標
 (平均合併 8天 7小時) (30 天內合併 3 個 PR)

描述

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.

貢獻者指南