#7073·pixi

feat(pixi-build-cmake): improve automated input detection for header-only libraries

Author: lucascolleyCreated Sep 20, 2026Updated Sep 21, 2026
Labelsenhancementarea:buildpixi-build-cmake

A header-only C++ library which uses e.g.

cmake
add_library(xsf INTERFACE)
target_include_directories(xsf
    INTERFACE
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
        $<INSTALL_INTERFACE:include>
)

install(
    TARGETS xsf
    EXPORT xsfTargets
)

install(
    DIRECTORY include/
    DESTINATION include
)

to ship its headers:

 │ │ Files in package:
 │ │   ├─ include/xsf/agm.h (2.21 KiB)
 │ │   ├─ include/xsf/airy.h (16.45 KiB)
 │ │   ├─ include/xsf/alg.h (235 B)
...

should ideally have changes to these headers automatically invalidate a cached build.

However, because nothing is compiled from these headers for such a header-only package, the headers are not visible to ninja, and thus the input tracking strategies described at https://pixi.prefix.dev/latest/build/backends/pixi-build-cmake/#input-tracking fail to include them.

An easy workaround is to use extra-input-globs, but @baszalmstra suggested that it might be good to have any source headers which are included in the output package files be automatically tracked as inputs.