NOAA-OWP / ngen

Next Generation Water Modeling Engine and Framework Prototype
Other
84 stars 63 forks source link

CMake: add option to perform unity builds #751

Closed program-- closed 6 months ago

program-- commented 8 months ago

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

Changes

Checklist

Target Environment support