Bump CMake minimal version up to 3.5 #79
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
According to the docs1, compatibility with versions of CMake older than 3.5 is deprecated since the version 3.27. Ubuntu 24.04 provides CMake 3.28.3 by default, so uJIT configuration starts spoiling the diagnostics with the following warning:
Since there is no particular policies specified in the project CMake machinery, there is no need to stick to the 3.3.2 version. However, migration to the newest version requires more precise changes, so this patch only bumps the minimal required version up to 3.5.
As a result, all explicit includes for
CMakeParseArgumentsmodule have been removed, becausecmake_parse_argumentscommand is implemented natively since CMake 3.5, andlist(FIND ...)hack in the root CMakeLists.txt has been replaced withIN_LISToperator.Besides there are to more tiny changes, related to
cmake_mininum_required.First of all, the
FATAL_ERRORoption is accepted but ignored by CMake 2.6 and higher. It should be specified so CMake versions 2.4 and lower fail with an error instead of just a warning. Since compatibility with versions of CMake older than 2.8.12 is already deprecated, there is no need to provide this option anymore.Furthermore,
cmake_minimum_requiredshould be called at the beginning of the top-level CMakeLists.txt (even before calling theprojectcommand) to set the version and the policy settings before invoking other commands whose behavior they may affect. All other calls (especially, setting the same version) are definitely excess. Hence, the patch dropscmake_minimum_requiredcalls from all CMakeLists.txt except the root one.Signed-off-by: Igor Munkin imun@cpan.org