Skip to content

cmake: Use INSTALL(CODE) instead of add_custom_target to create kinfocenter symlink

Daan De Meyer requested to merge daandemeyer/kinfocenter:noop-incremental into master

Targets created via add_custom_target are always out-of-date and will always run on every build, slowing down the overall build and creating noise in build logs. Instead, we can use INSTALL(CODE) to create the necessary symlink at install time directly without using an intermediate target.

End result is that when building kinfocenter again after an initial build, we now get "ninja: no work to do." whereas before, the symlink target would be rebuilt every time.

Merge request reports