From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id E3B44D82141; Tue, 18 Jun 2024 13:23:15 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E3B44D82141 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1718706196; bh=ixfwcmyJZNrhpmN+pW9oTGhNO4D0qdU2ncF+Wbp0Rv4=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=dEGAMWvOKveqb9zwsSm2ucMb3MZzv8gYWfYXqn1DdfkSVWY2SYsDykufzBy9We54A WjSvp4RdBJbGs1PA5C63GrF+xe75cHPOihDR2lpZywQuKv4ccYoGOEyrgr11vmS+5S th5yw0QKcFe8txwLNQdKY/d4PkQh5sgMhEKJbF3E= Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [95.163.41.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 2138BD82141 for ; Tue, 18 Jun 2024 13:23:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2138BD82141 Received: by exim-smtp-dbbd7b44b-4k58c with esmtpa (envelope-from ) id 1sJVzX-00000000D7P-3xoz; Tue, 18 Jun 2024 13:23:08 +0300 Content-Type: multipart/alternative; boundary="------------uEBYsXWIUPP67hTKh0THSDsd" Message-ID: <4a696afa-a6d4-4ade-93eb-f275e461a59e@tarantool.org> Date: Tue, 18 Jun 2024 13:23:07 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun , Sergey Bronnikov References: In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9EB52AADBDB11C14939854E5A6FCB9ABCCF2CF611B1E40090182A05F538085040D48CCB2D9DFA565C3DE06ABAFEAF67059CE82C44B96F121BE15125206A6F5AD709E014349702AB77 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE79A2E61952DECAF71EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006376E247FA059B8D70F8F08D7030A58E5AD1A62830130A00468AEEEE3FBA3A834EE7353EFBB55337566A64EF38F035DF11665ABFD04611B3B68A4B6EFDBECD04DBD80135D702EEAD4B0389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C078FCF50C7EAF9C588941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6F459A8243F1D1D44CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C224924CCA63EC5B81E2976E601842F6C81A12EF20D2F80756B5FB606B96278B59C4276E601842F6C81A127C277FBC8AE2E8BF8AAAD17ED3A12983AA81AA40904B5D99C9F4D5AE37F343AD1F44FA8B9022EA23BBE47FD9DD3FB595F5C1EE8F4F765FC72CEEB2601E22B093A03B725D353964B2FFDA4F57982C5F435872C767BF85DA227C277FBC8AE2E8BA56E11165BA017C7EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A5BAFCFB2B2E0B14345002B1117B3ED6963C98CE77CBBB0AF2F5FEB6EB1EB183FD823CB91A9FED034534781492E4B8EEADF5E532225D4D775BBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFA042FEF08D40673DD30B3B3F3BD4BE9F53F7EA3D24396042D4B9157F16B17D2CC7C5EACBE3BE5B471521D91D49C923C789D989E455A3A179016846435D65B42B9D2FDFA0850B8F1CC226CC413062362A913E6812662D5F2AB9AF64DB4688768036DF5FE9C0001AF333F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojJvJpr60SBvKtojBgWEC0rw== X-Mailru-Sender: 520A125C2F17F0B1E52FEF5D219D614074B55EDBD0B8056CAC8EDD30083ED68E387F8271AA1DEC6B0152A3D17938EB451EB5A0BCEC6A560B3DDE9B364B0DF289BE2DA36745F2EEB5CEBA01FB949A1F1EEAB4BC95F72C04283CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] cmake: fix warnings about minimum required version X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This is a multi-part message in MIME format. --------------uEBYsXWIUPP67hTKh0THSDsd Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 (or , 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) +# 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 ...) +# 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 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 ... part being ignored     and preserving the pre-3.12 behavior of basing policies on ". > > 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 >> >> 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 >> --------------uEBYsXWIUPP67hTKh0THSDsd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

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 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


    
--------------uEBYsXWIUPP67hTKh0THSDsd--