Skip to content

cmake 3.19 will be a problem for mbedtls #3801

Closed

Description

@peter-toft-greve

cmake (https://cmake.org/download/) is about to release version 3.19
In https://github.com/ARMmbed/mbedtls/blob/development/CMakeLists.txt#L19 we have
cmake_minimum_required(VERSION 2.6)

That will soon be a problem - and with cmake 3.19 the user will get

CMake Deprecation Warning at CMakeLists.txt:19 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

I suggest to update e.g. to cmake_minimum_required(VERSION 3.15)
since 3.14 has "issues" and later releases are available in general.

Activity

  1. peter-toft-greve commented on Oct 20, 2020

    @peter-toft-greve
    Author

    I have suggested #3802

  2. peter-toft-greve commented on Oct 21, 2020

    @peter-toft-greve
    Author

    and if you are into cmake issues join the band in #3790 which is also a problem :)

  3. d3zd3z commented on Nov 2, 2020

    @d3zd3z
    Contributor

    #3788 demonstrates that 2.8.12 already doesn't work. I see two possibilities here:

    1. Update the minimum cmake version to 3.15. This makes it clear that the 2.8.12 doesn't actually work, but we more explicitly lose support for these targets.
    2. Work around the target_sources issue. If this can be solved, it would continue to be able to support platforms with cmake 2.8.12.

    I suggest if we decided to do 2, CI should include a build done with cmake 2.8.12, otherwise, it will be fairly easy to keep introducing changes that break with this version of cmake.

  4. gilles-peskine-arm commented on Nov 2, 2020

    @gilles-peskine-arm
    Contributor

    Our CI currently mostly runs Ubuntu 16.04, which has CMake 3.5.1, so switching to CMake 3.15 as the minimum supported version would be a pain for us maintainers as well as for users of the library. We aim to maintain compatibility with popular long-time support distributions, and for RHEL/CentOS 7 this means CMake 2.8.12.2 until June 2024.

  5. peter-toft-greve commented on Nov 2, 2020

    @peter-toft-greve
    Author

    @gilles-peskine-arm I would then encourage you to update the CI chain e.g. to Ubuntu 20.04.
    CMake 3.14 and earlier have odd errors - especially for Windows. I foresee that you will - at some point - before June 2024 have a conflict beween long term support and supported Cmake. I will happily give a beer in Copenhagen if I am wrong :)

  6. added 2 commits that reference this issue on Nov 3, 2020
    381c107
    ff28df9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions