build: exclude mptest target from compile commands #280

pull Sanjana2906 wants to merge 1 commits into bitcoin-core:master from Sanjana2906:fix/iwyu-mptest-compile-commands changing 1 files +1 −0
  1. Sanjana2906 commented at 9:30 AM on May 28, 2026: none

    build: exclude mptest target from compile commands

    Excludes mptest from compile_commands.json because it includes generated .capnp.h files that don't exist at configure time, causing IWYU failures when this repo is used as a subtree in Bitcoin Core.

    Follows the pattern established for example targets.

    Refs bitcoin/bitcoin#35361 (this change will resolve that issue once pulled into Bitcoin Core)

  2. build: exclude mptest target from compile commands 9986c1a209
  3. DrahtBot commented at 9:30 AM on May 28, 2026: none

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. hebasto commented at 6:15 PM on May 29, 2026: member

    I think that the issue should be addressed in https://github.com/bitcoin/bitcoin/blob/master/cmake/libmultiprocess.cmake, similar to the following:

      # Exclude examples from compilation database, because the examples are not
      # built by default, and they contain generated c++ code. Without this
      # exclusion, tools like clang-tidy and IWYU that make use of compilation
      # database would complain that the generated c++ source files do not exist. An
      # alternate fix could build "mpexamples" by default like "mptests" above.
      set_target_properties(mpcalculator mpprinter mpexample PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
    
  5. Sanjana2906 commented at 6:30 AM on May 30, 2026: none

    @hebasto Thank you for confirming the approach.

    I've opened PR #35418 with exactly this change — adding set_target_properties(mptest PROPERTIES EXPORT_COMPILE_COMMANDS OFF) to cmake/libmultiprocess.cmake, following the same pattern as the examples.

    Link: https://github.com/bitcoin/bitcoin/pull/35418


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-05-31 17:30 UTC

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