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. real-or-random approved
  10. real-or-random commented at 1:22 AM on March 13, 2023: contributor

    utACK 96dd0625112672e841eea723398cc2a1c3489a30

  11. 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.

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

  14. sipa referenced this in commit e1552d578e on Apr 11, 2023
  15. sipa referenced this in commit c981671e9b on Apr 14, 2023
  16. hebasto referenced this in commit 49c52ea2b1 on May 13, 2023
  17. RandyMcMillan referenced this in commit 3cc75121b3 on May 27, 2023
  18. vmta referenced this in commit e1120c94a1 on Jun 4, 2023
  19. vmta referenced this in commit 8f03457eed on Jul 1, 2023
  20. delta1 referenced this in commit 3f32c20932 on Aug 8, 2023
  21. delta1 referenced this in commit 31ac0c1081 on Aug 31, 2023
  22. janus referenced this in commit 05145db5ff on Sep 3, 2023
  23. backpacker69 referenced this in commit e66b1bd882 on Mar 5, 2024
  24. div72 referenced this in commit af627d47c3 on Apr 12, 2025
  25. str4d referenced this in commit f634fc6004 on Jun 4, 2025

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: 2026-05-19 06:52 UTC