cmake: Fix CMake 4.5 install_prep warning for generated proxy.capnp.h #398

pull raus7n wants to merge 1 commits into bitcoin-core:master from raus7n:cmake-install-prep-warning changing 1 files +22 −4
  1. raus7n commented at 10:50 PM on November 15, 2026: none

    Fixes #397.

    CMake 4.5 expects every generated file that a target installs to be the output of a custom command attached to exactly one target. Otherwise it emits the author warning reported in #397 for the Makefile generators.

    capnp_generate_cpp() lists both proxy.capnp.c++ and proxy.capnp.h as outputs of one command, which ended up attached to both mp_headers and multiprocess. Adding add_dependencies(multiprocess mp_headers), as the warning suggests, does not help: the command is still attached to two targets.

    This change runs the same capnp compile command directly, with proxy.capnp.c++ as a byproduct, so the command is attached only to mp_headers. multiprocess no longer lists the generated header as a source (it is still installed through PUBLIC_HEADER) and depends on mp_headers so the generated source exists before it is compiled. mp_headers still only generates headers and does not compile anything.

    Tested with CMake 4.5.0: the warning is gone with Makefile and Ninja generators.

  2. cmake: Fix CMake 4.5 install_prep warning for generated proxy.capnp.h 0bb8703b31
  3. DrahtBot commented at 10:50 PM on November 15, 2026: none

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

    LLM Linter (✨ experimental)

    Possible typos and grammar issues:

    • CMakeLists.txt: Capn'Proto → Cap'n Proto [misspelling]

    <sup>2026-11-15 22:50:56</sup>


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-11-17 18:30 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me