* [Tarantool-patches] [PATCH luajit] cmake: fix warnings about minimum required version @ 2024-03-21 8:33 Sergey Bronnikov via Tarantool-patches 2024-03-21 10:13 ` Maxim Kokryashkin via Tarantool-patches ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Sergey Bronnikov via Tarantool-patches @ 2024-03-21 8:33 UTC (permalink / raw) To: tarantool-patches, Sergey Kaplun, Maxim Kokryashkin From: Sergey Bronnikov <sergeyb@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 a max supported CMake version and suppress a warning. 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 with a that version. --- 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 @@ # --- Initial setup ------------------------------------------------------------ # See the rationale below (near LUAJIT_TEST_BINARY variable). -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) project(LuaJIT C) # XXX: Originally CMake machinery is introduced to make LuaJIT diff --git a/etc/CMakeLists.txt b/etc/CMakeLists.txt index d54fa794..39f6df77 100644 --- a/etc/CMakeLists.txt +++ b/etc/CMakeLists.txt @@ -1,7 +1,7 @@ # Building supplementary materials for LuaJIT. # See the rationale in the root CMakeLists.txt. -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) set(LUAJIT_PC_PREFIX ${CMAKE_INSTALL_PREFIX}) if(CMAKE_LIBRARY_ARCHITECTURE) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 03338306..be11dde6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,7 +4,7 @@ # Copyright (C) 2015-2020 IPONWEB Ltd. # See the rationale in the root CMakeLists.txt. -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) enable_language(ASM) diff --git a/src/host/CMakeLists.txt b/src/host/CMakeLists.txt index 1ce3e224..3ca158a5 100644 --- a/src/host/CMakeLists.txt +++ b/src/host/CMakeLists.txt @@ -1,7 +1,7 @@ # Building the toolchain for LuaJIT VM preprocessing. # See the rationale in the root CMakeLists.txt. -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) # FIXME: Both minilua and buildvm need to be build with the HOST_* # toolchain. diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3ad5d15f..8af043f7 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,7 +1,7 @@ # Running various test suites against LuaJIT. # See the rationale in the root CMakeLists.txt. -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) include(MakeLuaPath) diff --git a/test/LuaJIT-tests/CMakeLists.txt b/test/LuaJIT-tests/CMakeLists.txt index a0fb5440..a884070a 100644 --- a/test/LuaJIT-tests/CMakeLists.txt +++ b/test/LuaJIT-tests/CMakeLists.txt @@ -1,5 +1,5 @@ # See the rationale in the root CMakeLists.txt -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) add_subdirectory(src) diff --git a/test/LuaJIT-tests/src/CMakeLists.txt b/test/LuaJIT-tests/src/CMakeLists.txt index 2f90da86..704c7acf 100644 --- a/test/LuaJIT-tests/src/CMakeLists.txt +++ b/test/LuaJIT-tests/src/CMakeLists.txt @@ -1,5 +1,5 @@ # See the rationale in the root CMakeLists.txt. -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) # Use `lib` prefix for loading via FFI and `require()`. AddTestLib(libctest libctest.c) diff --git a/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt b/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt index 98277f9a..7820d39b 100644 --- a/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt +++ b/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt @@ -2,7 +2,7 @@ # in scope of https://github.com/tarantool/tarantool/issues/5845. # See the rationale in the root CMakeLists.txt. -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) # XXX: There are two ways to set up the proper environment # described in the suite's README: diff --git a/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt b/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt index b496cbab..d34151e1 100644 --- a/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt +++ b/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt @@ -2,7 +2,7 @@ # in scope of https://github.com/tarantool/tarantool/issues/5845. # See the rationale in the root CMakeLists.txt. -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) # Build additional C libraries for tests. AddTestLib(lib1 lib1.c) diff --git a/test/lua-Harness-tests/CMakeLists.txt b/test/lua-Harness-tests/CMakeLists.txt index f748a8fd..2b4bb0ab 100644 --- a/test/lua-Harness-tests/CMakeLists.txt +++ b/test/lua-Harness-tests/CMakeLists.txt @@ -2,7 +2,7 @@ # in scope of https://github.com/tarantool/tarantool/issues/5844. # See the rationale in the root CMakeLists.txt -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) find_program(PROVE prove) if(NOT PROVE) diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt index e6d12984..c505f196 100644 --- a/test/tarantool-tests/CMakeLists.txt +++ b/test/tarantool-tests/CMakeLists.txt @@ -2,7 +2,7 @@ # scope of https://github.com/tarantool/tarantool/issues/4478. # See the rationale in the root CMakeLists.txt. -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) find_program(PROVE prove) if(NOT PROVE) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 695c079a..09fe0230 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -4,7 +4,7 @@ # Copyright (C) 2015-2020 IPONWEB Ltd. # See the rationale in the root CMakeLists.txt. -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) set(LUAJIT_TOOLS_DEPS) -- 2.34.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Tarantool-patches] [PATCH luajit] cmake: fix warnings about minimum required version 2024-03-21 8:33 [Tarantool-patches] [PATCH luajit] cmake: fix warnings about minimum required version Sergey Bronnikov via Tarantool-patches @ 2024-03-21 10:13 ` Maxim Kokryashkin via Tarantool-patches 2024-03-22 15:23 ` Sergey Bronnikov via Tarantool-patches 2024-06-17 12:47 ` Sergey Kaplun via Tarantool-patches 2024-07-09 8:05 ` Sergey Kaplun via Tarantool-patches 2 siblings, 1 reply; 7+ messages in thread From: Maxim Kokryashkin via Tarantool-patches @ 2024-03-21 10:13 UTC (permalink / raw) To: Sergey Bronnikov; +Cc: tarantool-patches 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@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> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Tarantool-patches] [PATCH luajit] cmake: fix warnings about minimum required version 2024-03-21 10:13 ` Maxim Kokryashkin via Tarantool-patches @ 2024-03-22 15:23 ` Sergey Bronnikov via Tarantool-patches 2024-04-08 9:15 ` Maxim Kokryashkin via Tarantool-patches 0 siblings, 1 reply; 7+ messages in thread From: Sergey Bronnikov via Tarantool-patches @ 2024-03-22 15:23 UTC (permalink / raw) To: Maxim Kokryashkin, Sergey Bronnikov; +Cc: tarantool-patches Max, thanks for your comments! On 3/21/24 13:13, Maxim Kokryashkin wrote: > 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@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/ Fixed. >> 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. Added. >> 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/ Fixed. >> with a that version. > Typo: s/a that/that/ Fixed. >> --- >> 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> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Tarantool-patches] [PATCH luajit] cmake: fix warnings about minimum required version 2024-03-22 15:23 ` Sergey Bronnikov via Tarantool-patches @ 2024-04-08 9:15 ` Maxim Kokryashkin via Tarantool-patches 0 siblings, 0 replies; 7+ messages in thread From: Maxim Kokryashkin via Tarantool-patches @ 2024-04-08 9:15 UTC (permalink / raw) To: Sergey Bronnikov; +Cc: Sergey Bronnikov, tarantool-patches Hi, Sergey! Thanks for the fixes! LGTM now. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Tarantool-patches] [PATCH luajit] cmake: fix warnings about minimum required version 2024-03-21 8:33 [Tarantool-patches] [PATCH luajit] cmake: fix warnings about minimum required version Sergey Bronnikov via Tarantool-patches 2024-03-21 10:13 ` Maxim Kokryashkin via Tarantool-patches @ 2024-06-17 12:47 ` Sergey Kaplun via Tarantool-patches 2024-06-18 10:23 ` Sergey Bronnikov via Tarantool-patches 2024-07-09 8:05 ` Sergey Kaplun via Tarantool-patches 2 siblings, 1 reply; 7+ messages in thread From: Sergey Kaplun via Tarantool-patches @ 2024-06-17 12:47 UTC (permalink / raw) To: Sergey Bronnikov; +Cc: tarantool-patches Hi, Sergey! Thanks for the patch! Generally LGTM, but I have a couple of questions: 1) What happens if we use a feature that is introduced in 2.4 (for example) and becomes deprecated in: a) 2.27? b) 2.30? 2) Can we declare the minimum required version in the root CMakeLists.txt of the project instead? On 21.03.24, Sergey Bronnikov wrote: > From: Sergey Bronnikov <sergeyb@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 > a max supported CMake version and suppress a warning. > 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 > with a that version. > --- > 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 @@ > # --- Initial setup ------------------------------------------------------------ > > # See the rationale below (near LUAJIT_TEST_BINARY variable). > -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) > project(LuaJIT C) > > # XXX: Originally CMake machinery is introduced to make LuaJIT > diff --git a/etc/CMakeLists.txt b/etc/CMakeLists.txt > index d54fa794..39f6df77 100644 > --- a/etc/CMakeLists.txt > +++ b/etc/CMakeLists.txt > @@ -1,7 +1,7 @@ > # Building supplementary materials for LuaJIT. > > # See the rationale in the root CMakeLists.txt. > -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) > > set(LUAJIT_PC_PREFIX ${CMAKE_INSTALL_PREFIX}) > if(CMAKE_LIBRARY_ARCHITECTURE) > diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt > index 03338306..be11dde6 100644 > --- a/src/CMakeLists.txt > +++ b/src/CMakeLists.txt > @@ -4,7 +4,7 @@ > # Copyright (C) 2015-2020 IPONWEB Ltd. > > # See the rationale in the root CMakeLists.txt. > -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) > > enable_language(ASM) > > diff --git a/src/host/CMakeLists.txt b/src/host/CMakeLists.txt > index 1ce3e224..3ca158a5 100644 > --- a/src/host/CMakeLists.txt > +++ b/src/host/CMakeLists.txt > @@ -1,7 +1,7 @@ > # Building the toolchain for LuaJIT VM preprocessing. > > # See the rationale in the root CMakeLists.txt. > -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) > > # FIXME: Both minilua and buildvm need to be build with the HOST_* > # toolchain. > diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt > index 3ad5d15f..8af043f7 100644 > --- a/test/CMakeLists.txt > +++ b/test/CMakeLists.txt > @@ -1,7 +1,7 @@ > # Running various test suites against LuaJIT. > > # See the rationale in the root CMakeLists.txt. > -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) > > include(MakeLuaPath) > > diff --git a/test/LuaJIT-tests/CMakeLists.txt b/test/LuaJIT-tests/CMakeLists.txt > index a0fb5440..a884070a 100644 > --- a/test/LuaJIT-tests/CMakeLists.txt > +++ b/test/LuaJIT-tests/CMakeLists.txt > @@ -1,5 +1,5 @@ > # See the rationale in the root CMakeLists.txt > -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) > > add_subdirectory(src) > > diff --git a/test/LuaJIT-tests/src/CMakeLists.txt b/test/LuaJIT-tests/src/CMakeLists.txt > index 2f90da86..704c7acf 100644 > --- a/test/LuaJIT-tests/src/CMakeLists.txt > +++ b/test/LuaJIT-tests/src/CMakeLists.txt > @@ -1,5 +1,5 @@ > # See the rationale in the root CMakeLists.txt. > -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) > > # Use `lib` prefix for loading via FFI and `require()`. > AddTestLib(libctest libctest.c) > diff --git a/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt b/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt > index 98277f9a..7820d39b 100644 > --- a/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt > +++ b/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt > @@ -2,7 +2,7 @@ > # in scope of https://github.com/tarantool/tarantool/issues/5845. > > # See the rationale in the root CMakeLists.txt. > -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) > > # XXX: There are two ways to set up the proper environment > # described in the suite's README: > diff --git a/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt b/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt > index b496cbab..d34151e1 100644 > --- a/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt > +++ b/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt > @@ -2,7 +2,7 @@ > # in scope of https://github.com/tarantool/tarantool/issues/5845. > > # See the rationale in the root CMakeLists.txt. > -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) > > # Build additional C libraries for tests. > AddTestLib(lib1 lib1.c) > diff --git a/test/lua-Harness-tests/CMakeLists.txt b/test/lua-Harness-tests/CMakeLists.txt > index f748a8fd..2b4bb0ab 100644 > --- a/test/lua-Harness-tests/CMakeLists.txt > +++ b/test/lua-Harness-tests/CMakeLists.txt > @@ -2,7 +2,7 @@ > # in scope of https://github.com/tarantool/tarantool/issues/5844. > > # See the rationale in the root CMakeLists.txt > -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) > > find_program(PROVE prove) > if(NOT PROVE) > diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt > index e6d12984..c505f196 100644 > --- a/test/tarantool-tests/CMakeLists.txt > +++ b/test/tarantool-tests/CMakeLists.txt > @@ -2,7 +2,7 @@ > # scope of https://github.com/tarantool/tarantool/issues/4478. > > # See the rationale in the root CMakeLists.txt. > -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) > > find_program(PROVE prove) > if(NOT PROVE) > diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt > index 695c079a..09fe0230 100644 > --- a/tools/CMakeLists.txt > +++ b/tools/CMakeLists.txt > @@ -4,7 +4,7 @@ > # Copyright (C) 2015-2020 IPONWEB Ltd. > > # See the rationale in the root CMakeLists.txt. > -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) > +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) > > set(LUAJIT_TOOLS_DEPS) > > -- > 2.34.1 > -- Best regards, Sergey Kaplun ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Tarantool-patches] [PATCH luajit] cmake: fix warnings about minimum required version 2024-06-17 12:47 ` Sergey Kaplun via Tarantool-patches @ 2024-06-18 10:23 ` Sergey Bronnikov via Tarantool-patches 0 siblings, 0 replies; 7+ messages in thread From: Sergey Bronnikov via Tarantool-patches @ 2024-06-18 10:23 UTC (permalink / raw) To: Sergey Kaplun, Sergey Bronnikov; +Cc: tarantool-patches [-- Attachment #1: Type: text/plain, Size: 10356 bytes --] Hi, Sergey On 17.06.2024 15:47, Sergey Kaplun wrote: > Hi, Sergey! > Thanks for the patch! > Generally LGTM, but I have a couple of questions: > > 1) What happens if we use a feature that is introduced in 2.4 (for > example) and becomes deprecated in: > a) 2.27? > b) 2.30? According to CMake documentation: [1] > *All policies known to the running version of CMake and introduced in the <min> (or <max>, if specified) version or earlier will be set to use NEW behavior. All policies introduced in later versions will be unset.* This effectively requests behavior preferred as of a given CMake version and tells newer CMake versions to warn about their new policies. Looks acceptable for us, right? 1. https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html#policy-settings Also, I've updated a comment before cmake_minimum_required: --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,16 @@ # --- Initial setup ------------------------------------------------------------ # See the rationale below (near LUAJIT_TEST_BINARY variable). -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +# <policy_max> is set to 3.18 because compatibility with versions +# of CMake older than 2.8.12 is deprecated. Calls to +# cmake_minimum_required(VERSION) that do not specify at +# least 2.8.12 as their policy version (optionally via ...<max>) +# will produce a deprecation warning in CMake 3.19 and above [1]. +# Compatibility with 2.8.12 is needed for CMP0002 [2]. +# +# [1] https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html#policy-settings +# [2] https://cmake.org/cmake/help/latest/policy/CMP0002.html +cmake_minimum_required(VERSION 3.1...3.18 FATAL_ERROR) project(LuaJIT C) # XXX: Originally CMake machinery is introduced to make LuaJIT and added a note to the commit message regarding compatibility with Tarantool's cmake minimum required version: Note, that a current minimum required version in Tarantool is equal to 2.8, but <policy_max> is introduced in CMake 3.12 [2]. However, according to [2] it is not a problem, because if CMake is "older than 3.12, the extra ... dots will be seen as version component separators, resulting in the ...<max> part being ignored and preserving the pre-3.12 behavior of basing policies on <min>". > > 2) Can we declare the minimum required version in the root > CMakeLists.txt of the project instead? It is already done in the branch, but I haven't sent an updated version to the list. Sorry, my bad. I'll send v2 soon. > > On 21.03.24, Sergey Bronnikov wrote: >> From: Sergey Bronnikov<sergeyb@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 >> a max supported CMake version and suppress a warning. >> 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 >> with a that version. >> --- >> 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 @@ >> # --- Initial setup ------------------------------------------------------------ >> >> # See the rationale below (near LUAJIT_TEST_BINARY variable). >> -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) >> +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) >> project(LuaJIT C) >> >> # XXX: Originally CMake machinery is introduced to make LuaJIT >> diff --git a/etc/CMakeLists.txt b/etc/CMakeLists.txt >> index d54fa794..39f6df77 100644 >> --- a/etc/CMakeLists.txt >> +++ b/etc/CMakeLists.txt >> @@ -1,7 +1,7 @@ >> # Building supplementary materials for LuaJIT. >> >> # See the rationale in the root CMakeLists.txt. >> -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) >> +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) >> >> set(LUAJIT_PC_PREFIX ${CMAKE_INSTALL_PREFIX}) >> if(CMAKE_LIBRARY_ARCHITECTURE) >> diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt >> index 03338306..be11dde6 100644 >> --- a/src/CMakeLists.txt >> +++ b/src/CMakeLists.txt >> @@ -4,7 +4,7 @@ >> # Copyright (C) 2015-2020 IPONWEB Ltd. >> >> # See the rationale in the root CMakeLists.txt. >> -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) >> +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) >> >> enable_language(ASM) >> >> diff --git a/src/host/CMakeLists.txt b/src/host/CMakeLists.txt >> index 1ce3e224..3ca158a5 100644 >> --- a/src/host/CMakeLists.txt >> +++ b/src/host/CMakeLists.txt >> @@ -1,7 +1,7 @@ >> # Building the toolchain for LuaJIT VM preprocessing. >> >> # See the rationale in the root CMakeLists.txt. >> -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) >> +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) >> >> # FIXME: Both minilua and buildvm need to be build with the HOST_* >> # toolchain. >> diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt >> index 3ad5d15f..8af043f7 100644 >> --- a/test/CMakeLists.txt >> +++ b/test/CMakeLists.txt >> @@ -1,7 +1,7 @@ >> # Running various test suites against LuaJIT. >> >> # See the rationale in the root CMakeLists.txt. >> -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) >> +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) >> >> include(MakeLuaPath) >> >> diff --git a/test/LuaJIT-tests/CMakeLists.txt b/test/LuaJIT-tests/CMakeLists.txt >> index a0fb5440..a884070a 100644 >> --- a/test/LuaJIT-tests/CMakeLists.txt >> +++ b/test/LuaJIT-tests/CMakeLists.txt >> @@ -1,5 +1,5 @@ >> # See the rationale in the root CMakeLists.txt >> -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) >> +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) >> >> add_subdirectory(src) >> >> diff --git a/test/LuaJIT-tests/src/CMakeLists.txt b/test/LuaJIT-tests/src/CMakeLists.txt >> index 2f90da86..704c7acf 100644 >> --- a/test/LuaJIT-tests/src/CMakeLists.txt >> +++ b/test/LuaJIT-tests/src/CMakeLists.txt >> @@ -1,5 +1,5 @@ >> # See the rationale in the root CMakeLists.txt. >> -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) >> +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) >> >> # Use `lib` prefix for loading via FFI and `require()`. >> AddTestLib(libctest libctest.c) >> diff --git a/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt b/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt >> index 98277f9a..7820d39b 100644 >> --- a/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt >> +++ b/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt >> @@ -2,7 +2,7 @@ >> # in scope ofhttps://github.com/tarantool/tarantool/issues/5845. >> >> # See the rationale in the root CMakeLists.txt. >> -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) >> +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) >> >> # XXX: There are two ways to set up the proper environment >> # described in the suite's README: >> diff --git a/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt b/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt >> index b496cbab..d34151e1 100644 >> --- a/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt >> +++ b/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt >> @@ -2,7 +2,7 @@ >> # in scope ofhttps://github.com/tarantool/tarantool/issues/5845. >> >> # See the rationale in the root CMakeLists.txt. >> -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) >> +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) >> >> # Build additional C libraries for tests. >> AddTestLib(lib1 lib1.c) >> diff --git a/test/lua-Harness-tests/CMakeLists.txt b/test/lua-Harness-tests/CMakeLists.txt >> index f748a8fd..2b4bb0ab 100644 >> --- a/test/lua-Harness-tests/CMakeLists.txt >> +++ b/test/lua-Harness-tests/CMakeLists.txt >> @@ -2,7 +2,7 @@ >> # in scope ofhttps://github.com/tarantool/tarantool/issues/5844. >> >> # See the rationale in the root CMakeLists.txt >> -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) >> +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) >> >> find_program(PROVE prove) >> if(NOT PROVE) >> diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt >> index e6d12984..c505f196 100644 >> --- a/test/tarantool-tests/CMakeLists.txt >> +++ b/test/tarantool-tests/CMakeLists.txt >> @@ -2,7 +2,7 @@ >> # scope ofhttps://github.com/tarantool/tarantool/issues/4478. >> >> # See the rationale in the root CMakeLists.txt. >> -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) >> +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) >> >> find_program(PROVE prove) >> if(NOT PROVE) >> diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt >> index 695c079a..09fe0230 100644 >> --- a/tools/CMakeLists.txt >> +++ b/tools/CMakeLists.txt >> @@ -4,7 +4,7 @@ >> # Copyright (C) 2015-2020 IPONWEB Ltd. >> >> # See the rationale in the root CMakeLists.txt. >> -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) >> +cmake_minimum_required(VERSION 3.1...3.27.7 FATAL_ERROR) >> >> set(LUAJIT_TOOLS_DEPS) >> >> -- >> 2.34.1 >> [-- Attachment #2: Type: text/html, Size: 12219 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Tarantool-patches] [PATCH luajit] cmake: fix warnings about minimum required version 2024-03-21 8:33 [Tarantool-patches] [PATCH luajit] cmake: fix warnings about minimum required version Sergey Bronnikov via Tarantool-patches 2024-03-21 10:13 ` Maxim Kokryashkin via Tarantool-patches 2024-06-17 12:47 ` Sergey Kaplun via Tarantool-patches @ 2024-07-09 8:05 ` Sergey Kaplun via Tarantool-patches 2 siblings, 0 replies; 7+ messages in thread From: Sergey Kaplun via Tarantool-patches @ 2024-07-09 8:05 UTC (permalink / raw) To: Sergey Bronnikov; +Cc: tarantool-patches Sergey, I've checked the patchset into all long-term branches in tarantool/luajit and bumped a new version in master [1], release/3.1 [2] and release/2.11 [3]. [1]: https://github.com/tarantool/tarantool/pull/10200 [2]: https://github.com/tarantool/tarantool/pull/10201 [3]: https://github.com/tarantool/tarantool/pull/10202 -- Best regards, Sergey Kaplun ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-07-09 8:05 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-03-21 8:33 [Tarantool-patches] [PATCH luajit] cmake: fix warnings about minimum required version Sergey Bronnikov via Tarantool-patches 2024-03-21 10:13 ` Maxim Kokryashkin via Tarantool-patches 2024-03-22 15:23 ` Sergey Bronnikov via Tarantool-patches 2024-04-08 9:15 ` Maxim Kokryashkin via Tarantool-patches 2024-06-17 12:47 ` Sergey Kaplun via Tarantool-patches 2024-06-18 10:23 ` Sergey Bronnikov via Tarantool-patches 2024-07-09 8:05 ` Sergey Kaplun via Tarantool-patches
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox