cmake: Fix IF_CHECK_PASSED option handling #31231

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:241106-cmake-fix changing 2 files +4 −2
  1. hebasto commented at 9:01 am on November 6, 2024: member

    IF_CHECK_PASSED is a multi-value keyword, resulting in a list value. Convert it to a string before applying any string() command.

    Split from #30861.

    No current CMake code is affected by this bug.

  2. cmake: Fix `IF_CHECK_PASSED` option handling
    `IF_CHECK_PASSED` is a multi-value keyword, resulting in a list value.
    Convert it to a string before applying any `string()` command.
    97a18c8545
  3. hebasto added the label Bug on Nov 6, 2024
  4. hebasto added the label Build system on Nov 6, 2024
  5. DrahtBot commented at 9:02 am on November 6, 2024: 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/31231.

    Reviews

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

  6. theuni approved
  7. theuni commented at 8:24 pm on December 3, 2024: member

    utACK 97a18c85458b898fe5e3abda9528a2de442766ad

    Confirmed that this indeed a list.

    To other reviewers: the string(STRIP "${foo} ${bar}" ${baz}) syntax is confusing. It’s just concatenating foo and bar and storing it in baz with no whitespace at the beginning or end. @hebasto Is there a way to get CMake to warn us about these? It seems like it should know that we were attempting a string operation on a list.

  8. hebasto commented at 8:34 pm on December 3, 2024: member

    @hebasto Is there a way to get CMake to warn us about these? It seems like it should know that we were attempting a string operation on a list.

    I’m not aware of any such embedded functionality. CMake’s internally represents both “strings” and “lists” as strings. A list can safely be treated as a string when it contains fewer than two elements.

  9. fanquake merged this on Dec 6, 2024
  10. fanquake closed this on Dec 6, 2024

  11. hebasto deleted the branch on Dec 6, 2024
  12. sedited referenced this in commit 230a439a4a on Jan 17, 2025
  13. stickies-v referenced this in commit d760fd3dda on Mar 17, 2025
  14. stickies-v referenced this in commit cc83553352 on Mar 17, 2025
  15. stickies-v referenced this in commit 2614933f06 on Mar 17, 2025
  16. stickies-v referenced this in commit b70418c5fc on Mar 17, 2025
  17. stickies-v referenced this in commit 69f8a1fe50 on Mar 17, 2025
  18. bug-castercv502 referenced this in commit 44b075fe71 on Sep 28, 2025
  19. bitcoin locked this on Dec 6, 2025

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: 2026-01-08 06:13 UTC

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