This PR adds the option NGEN_WITH_UNITY_BUILD, which is a convenience option to build NGen targets as unity builds. This speeds up compilation by roughly ~20%, and may introduce some more optimizations similar to LTO/IPO.
[!NOTE]
This will be more useful as CMake targets get cleaned up, since
currently the way we handle search paths for sublibraries prevents
a lot of sources from being "unified". But with some refactoring, this
should become better.
Additions
Adds NGEN_WITH_UNITY_BUILD CMake option.
Small utility: adds what Linker is used to configure output.
Changes
Sorts NGen::geopackage source files to enable unity builds
Checklist
[X] PR has an informative and human-readable title
[X] Changes are limited to a single goal (no scope creep)
[X] Code can be automatically merged (no conflicts)
[X] Code follows project standards (link if applicable)
[ ] Passes all existing automated tests
[X] Any change in functionality is tested
[X] New functions are documented (with a description, list of inputs, and expected output)
[X] Placeholder code is flagged / future todos are captured in comments
[X] Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
[X] Reviewers requested with the Reviewers tool :arrow_right:
This PR adds the option
NGEN_WITH_UNITY_BUILD
, which is a convenience option to build NGen targets as unity builds. This speeds up compilation by roughly ~20%, and may introduce some more optimizations similar to LTO/IPO.Additions
NGEN_WITH_UNITY_BUILD
CMake option.Changes
NGen::geopackage
source files to enable unity buildsChecklist
Target Environment support