build: bump CMake minimum requirement to 3.13 #1238

pull theuni wants to merge 1 commits into bitcoin-core:master from theuni:cmake-bump changing 1 files +1 −6
  1. theuni commented at 5:56 pm on March 12, 2023: contributor

    As requested here: #1230 (comment) . Ping @hebasto

    Among other things this allows us to link against object libraries.

    3.13 has been mentioned several times as a good overlap between newish features and widespread Linux availability.

  2. in CMakeLists.txt:208 in cb092b368b outdated
    208-  # See: https://cmake.org/cmake/help/latest/policy/CMP0063.html
    209-  cmake_policy(SET CMP0063 NEW)
    210-endif()
    211+# Honor visibility properties for all target types.
    212+# See: https://cmake.org/cmake/help/latest/policy/CMP0063.html
    213+cmake_policy(SET CMP0063 NEW)
    


    hebasto commented at 6:01 pm on March 12, 2023:
    These lines can be removed, as CMP0063 was introduced in CMake 3.3, and cmake_minimum_required(VERSION 3.13) will set it to NEW by default.

    theuni commented at 6:03 pm on March 12, 2023:

    I was going by the docs:

    This policy was introduced in CMake version 3.3. CMake version 3.26.0-rc6 warns when the policy is not set and uses OLD behavior. Use the cmake_policy() command to set it to OLD or NEW explicitly.

    Is that not what happens in practice?


    hebasto commented at 6:10 pm on March 12, 2023:

    CMake version 3.26.0-rc6 warns when the policy is not set and uses OLD behavior.

    Is that not what happens in practice?

    CMake will emit such a warning.

    https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html#policy-settings:

    The cmake_minimum_required(VERSION) command implicitly invokes the cmake_policy(VERSION) command…

    All policies known to the running version of CMake and introduced in the <min> … version or earlier will be set to use NEW behavior.


    hebasto commented at 6:12 pm on March 12, 2023:

    Oh, I see…

    “use the cmake_policy() explicitly” vs “implicitly invokes the cmake_policy()” – indeed confusing :D


    theuni commented at 7:04 pm on March 12, 2023:
    Thanks for the explanation, fixed.
  3. hebasto commented at 6:01 pm on March 12, 2023: member
    Concept ACK.
  4. build: bump CMake minimum requirement to 3.13
    Among other things this allows us to link against object libraries.
    96dd062511
  5. theuni force-pushed on Mar 12, 2023
  6. hebasto approved
  7. hebasto commented at 7:07 pm on March 12, 2023: member
    ACK 96dd0625112672e841eea723398cc2a1c3489a30
  8. hebasto commented at 7:07 pm on March 12, 2023: member
  9. hebasto cross-referenced this on Mar 12, 2023 from issue cmake: Bugfix and other improvements after bumping CMake up to 3.13 by hebasto
  10. real-or-random approved
  11. real-or-random commented at 1:22 am on March 13, 2023: contributor
    utACK 96dd0625112672e841eea723398cc2a1c3489a30
  12. fanquake commented at 2:47 pm on March 13, 2023: member

    cc @fanquake

    Seems fine to me. IIRC we are also going to set our minimum to 3.13.

  13. real-or-random merged this on Mar 21, 2023
  14. real-or-random closed this on Mar 21, 2023

  15. hebasto cross-referenced this on Mar 22, 2023 from issue build: Meta-issue for follow-ups to initial CMake merge (#1113) by hebasto
  16. sipa referenced this in commit e1552d578e on Apr 11, 2023
  17. MatthewLM cross-referenced this on Apr 11, 2023 from issue Is CMake 3.13 absolutely required right now? by MatthewLM
  18. sipa referenced this in commit c981671e9b on Apr 14, 2023
  19. hebasto referenced this in commit 49c52ea2b1 on May 13, 2023
  20. RandyMcMillan referenced this in commit 3cc75121b3 on May 27, 2023
  21. vmta referenced this in commit e1120c94a1 on Jun 4, 2023
  22. vmta referenced this in commit 8f03457eed on Jul 1, 2023

github-metadata-mirror

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

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