-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake 3.19 will be a problem for mbedtls #3801
Comments
I have suggested #3802 |
* As described in issue Mbed-TLS#3801 the upcoming cmake 3.19 will not support cmake 2.6 any more. * This PR updates the mimumum required cmake version to 2.8.12, which will not give a warning with cmake 3.19 Signed-off-by: Peter Toft peter.toft@dirac.com"
and if you are into cmake issues join the band in #3790 which is also a problem :) |
* As described in issue Mbed-TLS#3801 the upcoming cmake 3.19 will not support cmake 2.6 any more. * This PR updates the mimumum required cmake version to 2.8.12, which will not give a warning with cmake 3.19 Signed-off-by: Peter Toft <peter.toft@dirac.com>
* As described in issue Mbed-TLS#3801 the upcoming cmake 3.19 will not support cmake 2.6 any more * This PR updates the mimumum required cmake version to 2.8.12, which will not give a warning with cmake 3.19 but still compatible with MbedTLS support of RHEL/CentOS 7 LTS * Adding ChangeLog.d/bugfix_PR3802.txt Signed-off-by: Peter Toft <peter.toft@dirac.com>
* As described in issue Mbed-TLS#3801 the upcoming cmake 3.19 will not support cmake 2.6 any more * This PR updates the mimimum required cmake version to 2.8.12, which will not give a warning with cmake 3.19 but still compatible with MbedTLS support of RHEL/CentOS 7 LTS * Adding ChangeLog.d/bugfix_PR3802.txt Signed-off-by: Peter Toft <peter.toft@dirac.com>
* As described in issue Mbed-TLS#3801 the upcoming cmake 3.19 will not support cmake 2.6 any more * This PR updates the mimimum required cmake version to 2.8.12, which will not give a warning with cmake 3.19 but still compatible with MbedTLS support of RHEL/CentOS 7 LTS * Adding ChangeLog.d/bugfix_PR3802.txt Signed-off-by: Peter Toft <peter.toft@dirac.com>
#3788 demonstrates that 2.8.12 already doesn't work. I see two possibilities here:
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. |
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. |
@gilles-peskine-arm I would then encourage you to update the CI chain e.g. to Ubuntu 20.04. |
CMake versions less than 3.0 do not support the `target_sources` command. In order to be able to support v2.8.12.2 of cmake, directly set the SOURCES property instead of using the target_sources command. A future patch could reverse this, if the project decides to forgo support for cmake versions less than 3.0. Fixes Mbed-TLS#3801 Signed-off-by: David Brown <david.brown@linaro.org>
CMake versions less than 3.0 do not support the `target_sources` command. In order to be able to support v2.8.12.2 of cmake, add the extra targets directly to the target command. This is a backport from the development branch, except that the uses in this branch are simpler, and modifying the SOURCES property directly is not needed. Fixes Mbed-TLS#3801 Signed-off-by: David Brown <david.brown@linaro.org>
In cmake version < 3.0, the SOURCES property on targets cannot be modified after the target is defined. There are several instances in the code that were using `target_properties()`, which is not available in the older versions of cmake. Unfortunately, the workaround in Mbed-TLS#3801 (381c107) assumes that this SOURCES property can be modified. Work around this by building up any necessary sources before declaring the target. This is more awkward, but needed to continue to be able to support the old versions of cmake. Signed-off-by: David Brown <david.brown@linaro.org>
In cmake version < 3.0, the SOURCES property on targets cannot be modified after the target is defined. There are several instances in the code that were using `target_properties()`, which is not available in the older versions of cmake. Unfortunately, the workaround in Mbed-TLS#3801 (381c107) assumes that this SOURCES property can be modified. Work around this by building up any necessary sources before declaring the target. This is more awkward, but needed to continue to be able to support the old versions of cmake. Fixes Mbed-TLS#3788. Signed-off-by: David Brown <david.brown@linaro.org>
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
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.
The text was updated successfully, but these errors were encountered: