cmake: Create subdirectories in build tree in advance #32773

pull hebasto wants to merge 2 commits into bitcoin:master from hebasto:250618-mkdir changing 1 files +65 −14
  1. hebasto commented at 7:52 pm on June 18, 2025: member

    While reviewing #32697, I noticed that symlink creation fails when the target subdirectory does not exist. In such cases, file(CREATE_LINK ... COPY_ON_ERROR SYMBOLIC) falls back to copying, which implicitly creates the required path. As a result, a single file is copied instead of symlinked for subdirectories in test/functional.

    This PR ensures that necessary subdirectories are created in advance, so that subsequent symlink creation does not fail due to missing paths.

  2. cmake: Create subdirectories in build tree in advance
    This change ensures that subsequent symlink creation does not fail due
    to a missing path.
    df2ae5fa6b
  3. hebasto added the label Build system on Jun 18, 2025
  4. hebasto added the label Tests on Jun 18, 2025
  5. DrahtBot commented at 7:52 pm on June 18, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32773.

    Reviews

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #32697 (test: Turn util/test_runner into functional test by maflcko)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  6. maflcko commented at 8:01 pm on June 18, 2025: member
    would it make sense to at least replace the recursive glob with a normal glob now, iterating over the given folders, given that they are listed anyway?
  7. cmake: Replace recursive globbing with explicit globbing in folders a1255bfb9d
  8. hebasto commented at 9:31 am on June 19, 2025: member

    would it make sense to at least replace the recursive glob with a normal glob now, iterating over the given folders, given that they are listed anyway?

    Sure! Added a commit.

  9. janb84 commented at 5:37 pm on June 23, 2025: contributor

    Any hints how to verify / test this ?

    Have tried to see any difference between this PR and master but it’s not clear to me what difference I should see. When used on #32697 there is a difference that without this PR build/test/functional/data/util/* is populated with this PR the util directory is not being created (looking at the source this is logical but unsure if there needs to be things done after 32697 is merged or not having the directory is intentional )

  10. purpleKarrot commented at 10:01 am on June 24, 2025: contributor
    Is this setting up the environment for tests to run? Ideally, things like that should be done as test fixture and not executed during build system generation.
  11. DrahtBot added the label Needs rebase on Jun 30, 2025
  12. DrahtBot commented at 6:25 pm on June 30, 2025: contributor
    🐙 This pull request conflicts with the target branch and needs rebase.

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: 2025-07-01 00:12 UTC

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