Skip to content

build: create header symlinks or stubs instead of copying headers to speed up configuration

This is an alternative to copying headers themselves to the output directory, being discussed in !886 (closed).

We generate stub header files with the same name as their counterparts, but their contents are simply an include to the real header.

The real headers are kept in their own modules and only copied when installing.

Doing that further reduces the frequency of CMake reconfigurations #597 (closed) and speeds up the configuration by up to 4x when using a HDD #588 (closed).

CMake configuration traces using a HDD and clean filesystem caches (`sudo sysctl vm.drop_caches=3`)

Before image

After (with stub headers) image

After (with symlinks) image

After (with batched symlinks) image

Edited by Gabriel Ferreira

Merge request reports

Loading