build: Introduce “Kernel” installation component #30835

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:240906-kernel changing 1 files +9 −3
  1. hebasto commented at 3:04 pm on September 6, 2024: member

    This PR enables building and installing only libbitcoinkernel, without the need to disable other targets during the project build system generation:

    0$ rm -rf build && cmake -B build -DBUILD_KERNEL_LIB=ON
    1$ cmake --build build --target bitcoinkernel
    2$ cmake --install build --component Kernel --prefix /home/hebasto/INSTALL
    3-- Install configuration: "RelWithDebInfo"
    4-- Installing: /home/hebasto/INSTALL/lib/libbitcoinkernel.so
    

    Please note, that only the bitcoinkernel target is being built.

    Related to #30801 and #30814.

  2. build: Introduce "Kernel" installation component
    This change enables building and installing only `libbitcoinkernel`,
    without the need to disable other targets during the project build
    system generation.
    7b04fabe2d
  3. hebasto added the label Build system on Sep 6, 2024
  4. DrahtBot commented at 3:05 pm on September 6, 2024: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK TheCharlatan, ryanofsky

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  5. in src/kernel/CMakeLists.txt:105 in 7b04fabe2d
     99@@ -100,7 +100,13 @@ set_target_properties(bitcoinkernel PROPERTIES
    100 
    101 include(GNUInstallDirs)
    102 install(TARGETS bitcoinkernel
    103-  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    104-  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    105-  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
    106+  RUNTIME
    107+    DESTINATION ${CMAKE_INSTALL_BINDIR}
    108+    COMPONENT Kernel
    


    TheCharlatan commented at 7:55 pm on September 6, 2024:
    Why call this Kernel and not bitcoinkernel?

    hebasto commented at 7:58 pm on September 6, 2024:
    For brevity. Do you want me to update it?

    TheCharlatan commented at 8:13 pm on September 6, 2024:
    I don’t think it matters really what it is called. As far as I know there is no way to list all available install components from the command line and discover its name. With the targets you can at least do cmake --build build --target help, so my idea was that this might make it more discoverable. But a component might also include multiple targets, so I don’t think colliding their names here really helps in terms of making it clearer. So in short, no need to change.
  6. DrahtBot added the label CI failed on Sep 6, 2024
  7. TheCharlatan approved
  8. TheCharlatan commented at 8:13 pm on September 6, 2024: contributor
    ACK 7b04fabe2d95f05a295b1ef30c9aeab7f753ed46
  9. DrahtBot removed the label CI failed on Sep 7, 2024
  10. hebasto commented at 1:09 pm on September 10, 2024: member
  11. ryanofsky approved
  12. ryanofsky commented at 1:51 pm on September 10, 2024: contributor

    Code review ACK 7b04fabe2d95f05a295b1ef30c9aeab7f753ed46

    0$ rm -rf build && cmake -B build -DBUILD_KERNEL_LIB=ON
    1$ cmake --build build --target bitcoinkernel
    2$ cmake --install build --component Kernel --prefix /home/hebasto/INSTALL
    

    Might be nice to document the steps for building and installing one component somewhere. I’m not sure if there is kernel library documentation where these steps could go.

  13. fanquake merged this on Sep 12, 2024
  14. fanquake closed this on Sep 12, 2024

  15. hebasto deleted the branch on Sep 12, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 09:12 UTC

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