#35515 cmake: Use target file name for manpage installation
https://github.com/bitcoin/bitcoin/pull/35515 · · +1/-1 in 1 files, 1 commits · labels: Build system
Goal
- Allow manpage installation to locate the correct file when executable names differ from target names
- Prevents failed or mismatched manpage installs when targets override their binary names
Updates the CMake binary installation helper to use the `$<TARGET_FILE_BASE_NAME>` generator expression instead of the logical target name when locating manpages in `doc/man/`. This allows manpage lookup to match the final executable name if properties like `OUTPUT_NAME` or `RUNTIME_OUTPUT_NAME` are set.
Problem: Currently, manpage installation assumes the installed executable name matches the CMake target name. If a build target overrides its output file name via target properties, manpage installation attempts to install a non-existent or mismatched manpage file.
Category: Build and CI (#49 of 55)
P4 · cleanup
- P4 because no current targets override output names, causing zero behavioral change today
- Serves only as speculative convenience for future or downstream target renaming
P4 because no current targets in the repository override output names, so this patch introduces zero behavioral change to the build or installation. The author notes 'No change in behavior for any current target, as none of them sets any of these properties' and motivated it for downstream staging branches (QML GUI). It is a harmless speculative convenience with no impact on release integrity or build reliability today.
Membership: Modifies `cmake/module/InstallBinaryComponent.cmake` for binary and manpage installation rules.
Factors: security/stability 0, bug 0, performance 0, user value 0, leverage 1
Reviewability: Stale: Author silent
- Author has been silent for three months, but the PR is ready to review with no merge conflicts
The author has been inactive on the PR for 92 days, exceeding the 60-day stale inactivity threshold.
Author status: silent since 2026-06-17
Open concerns:
- Disagreement over whether CMake targets should ever diverge from their binary names, particularly regarding the prospective `bitcoin-qt` to `bitcoin-qml` transition.
- 151henry151 noted that generator expressions also track debug/config postfixes, which could fail during installation if suffixed manpages do not exist in `doc/man/`.
Resolved concerns:
- ryanofsky accepted the rationale for drop-in GUI replacement after discussion, withdrawing opposition while maintaining that target and binary name consistency is preferable.
Agreement: Positive w/ caveats
- Supported as harmless future-proofing tested across build configurations (BrandonOdiwuor, 151henry151)
- Nonblocking objection: adds complexity and invites inconsistent target naming (ryanofsky)
- Concern that tracking build config postfixes could break manpage lookups (151henry151)
Positive w/ caveats: ryanofsky noted that diverging target and output names adds confusion, but agreed to disagree; two tested ACKs support the change.
ryanofsky raised an architectural objection regarding CMake target naming hygiene and logged concept -0, but agreed not to block. BrandonOdiwuor and 151henry151 tested the change across multiple configurations and supported merging as harmless future-proofing.
- ryanofsky: 'Code review ACK ... but concept -0. This change adds complexity and invites less consistent naming'
- ryanofsky: 'Your logic makes sense even if I disagree, and if you think this approach is better, I've acked the code change and don't want to get in the way.'
- BrandonOdiwuor: 'ACK 4108621... Confirmed that the old logic installs bitcoind.1... New logic correctly uses $<TARGET_FILE_BASE_NAME:...>'
- 151henry151: 'Tested ACK 4108621... Concept ACK as cheap future-proofing — $<TARGET_FILE_BASE_NAME> is the right tool here anyway'
Review verdicts (DrahtBot): 2
- ACK: ryanofsky, BrandonOdiwuor
- Concept ACK: 151henry151
Files
0 lines under test/bench/ci.
- cmake/module/InstallBinaryComponent.cmake +1/-1
Card
This PR modifies the CMake binary installation module to look up manpages using the generator expression `$<TARGET_FILE_BASE_NAME>` rather than the CMake target name. This ensures manpage filenames match the output binary if properties like `OUTPUT_NAME` are overridden, motivated by experimental staging branches replacing `bitcoin-qt` with `bitcoin-qml`. It causes zero functional change in master today since no targets set these properties. The code has two tested ACKs, while ryanofsky expressed conceptual reservations about naming divergence but did not block; the author has been silent for over 90 days.