PointCloudLibrary/pcl

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

Open

#649 创建于 2014年4月19日

在 GitHub 查看
 (13 评论) (0 反应) (0 负责人)C++ (4,506 fork)batch import
help wantedkind: todomodule: cmakeskill: cmake

仓库指标

Star
 (9,023 star)
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.

贡献者指南