noloader / cryptopp-cmake

CMake files for Crypto++ project
BSD 3-Clause "New" or "Revised" License
92 stars 68 forks source link

CMakeLists.txt sets minimum required version too low (deprecated) #88

Closed abdes closed 2 years ago

abdes commented 2 years ago

It's not clear why there is a minimum required version at all, as this CMakeLists.txt is so basic and does not need any special policies. Setting the minimum required version below 2.8.12 generates a deprecation warning and will be unsupported by CMake in future versions:

[build] CMake Deprecation Warning at third_party/cryptopp-cmake/CMakeLists.txt:34 (cmake_minimum_required):
[build]   Compatibility with CMake < 2.8.12 will be removed from a future version of
[build]   CMake.
[build] 
[build]   Update the VERSION argument <min> value or use a ...<max> suffix to tell
[build]   CMake that the project does not need compatibility with older versions.

Suggested solution: Set the minimum required version to 2.8.12 and eventually completely remove it after testing the CMakeLists.txt with a version 2.8.12.

abdes commented 2 years ago

The lowest Ubuntu version expected to be supported by this build project is Ubuntu Trusty, which now provides cmake 2.8.12 as a baseline.

abdes commented 2 years ago

Actually I tried very hard to make the CMakeLists.txt work with 2.8.12 with no success. That version is just too poor and the features used in build file are too big to rewrite. For example, even compiler ID detection does not work on 2.8.12...

The first version that works with the CMakeLists.txt and is available to install on CI systems is 3.1.x. So honestly, unless someone who needs below 3.1.0 jumps in and spends the time to rewrite the CMakeLists.txt to work with such old version, we should just move on and modernize.

The decision is not only mine though, so we need some feedback from people who actively use the cmake build.