PointCloudLibrary / PointCloudLibrary/pcl
[cmake] Adding support for PCH and Unity builds (using Cotire/CMake 3.16)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the project's CMake configuration and the cotire documentation linked in the issue. Reproduce the extract_indices example build and compare precompiled-header and Unity-build behavior with g++ and clang. Done means PCH and Unity builds are supported in the CMake setup without breaking the existing example builds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100