[Tarantool-patches] [PATCH luajit] cmake: fix warnings about minimum required version

Maxim Kokryashkin m.kokryashkin at tarantool.org
Thu Mar 21 13:13:13 MSK 2024


Hi, Sergey!
Thanks for the patch!
Please consider my comments below.

On Thu, Mar 21, 2024 at 11:33:29AM +0300, Sergey Bronnikov wrote:
> From: Sergey Bronnikov <sergeyb at tarantool.org>
>
> CMake produces annoying warnings:
>
> CMake Deprecation Warning at src/CMakeLists.txt:7 (cmake_minimum_required):
>   Compatibility with CMake < 3.5 will be removed from a future version of
>   CMake.
>
> We cannot bump a minimum required CMake version without
> bumping it in a Tarantool build system. However, we can set
Typo: s/in a/in the/
> a max supported CMake version and suppress a warning.
Please specify in the commit message and in comments in cmake files
that maximum supported version means "maximum version this CMake file
is known to work properly" and will not result in any build errors
rightaway for higher versions.
> CMake 3.27.7 is a version used by me for a long time for
> building LuaJIT. This version is tested and seen no policy warnings
Typo: s/is tested/has been tested/
Typo: s/there have been/
> with a that version.
Typo: s/a that/that/
> ---
> Branch: https://github.com/tarantool/luajit/tree/ligurio/fix-cmake-warnings
> Doc: https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html
>
> NOTE: another solution is using CMAKE_WARN_DEPRECATED,
> but I don't like it. Let's discuss.
>
> 1. https://cmake.org/cmake/help/latest/variable/CMAKE_WARN_DEPRECATED.html
>
>  CMakeLists.txt                                 | 2 +-
>  etc/CMakeLists.txt                             | 2 +-
>  src/CMakeLists.txt                             | 2 +-
>  src/host/CMakeLists.txt                        | 2 +-
>  test/CMakeLists.txt                            | 2 +-
>  test/LuaJIT-tests/CMakeLists.txt               | 2 +-
>  test/LuaJIT-tests/src/CMakeLists.txt           | 2 +-
>  test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt      | 2 +-
>  test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt | 2 +-
>  test/lua-Harness-tests/CMakeLists.txt          | 2 +-
>  test/tarantool-tests/CMakeLists.txt            | 2 +-
>  tools/CMakeLists.txt                           | 2 +-
>  12 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 7f5e2afb..9edff6f3 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -8,7 +8,7 @@
>
<snipped>


More information about the Tarantool-patches mailing list