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 B3290D1A086; Tue, 18 Jun 2024 15:01:16 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B3290D1A086 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1718712076; bh=v6fmFGq5pkeDsHuRLNwxaUll47y4N1adwk77hVwF3UQ=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=tLiull7mfWMHZX2guKOSgJjMmveVOyEdnj0eyv/cqkkywJwPp4PwhUpHDYsDHXo7e vi8BK4gCDi9XtVHS2PNB/7i9582L/lGxkgDzuftaQdT1zeWz/DExQZWBZVHfJ6qlMa jLczeXV3ud+bSWVmzUNbj/b+r3VE+MEmK0CTYvYc= Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 6978FEB29E2 for ; Tue, 18 Jun 2024 15:00:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6978FEB29E2 Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2ebe6495aedso50728641fa.0 for ; Tue, 18 Jun 2024 05:00:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718712026; x=1719316826; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p1PkLFTPMVrcaT89+2cCk86clcgQXRR6XsHM5QmSeW8=; b=CHFrsV+qCcbMw+VwNbHL/xWds0Q2ihjy640l0thyq9QJt0PptG2A13wr3BbqvgmYgE 4uHSp6kGuKbBrzi0XZ7iVBrRhfUNq/PIeLGrvRg2sLu4EzOaI31Mes/zRL5025i37gHB 4wvWs0VCekWivy4DHzfygvW29cWaRMBo+Q3MNzVREGke6vu/hshsFzBz43df3vsZ3wAv 6kD7TmstrHTpHKoIJa7Pf1Kl47wa1Se03ZHxz7TuU9XsbSoZZbZfT8TwN0vFSS9rT0jO 9ZQ1oNVHTX3QfxD7Ph7asaHVIzsRkSDaeGl+9J5Nj5BvP3WEhBe0i2AU45H1wO6GTjs7 MREg== X-Gm-Message-State: AOJu0Yyt0c34AtEXIu/7GBAp0oimGTQRLgwRxDmk54fy33JwevvXW2S7 GApXTYxq1YpeJzGHiqPhIbIpTHk4phgoN8IywsJDicWYqg0/YTidWf3vLmxh X-Google-Smtp-Source: AGHT+IE4VSSHecL8ZjDaZpyy08WQhtM5amVcUVq2iqEnPYdaBuXkaQwaLR0hhpJrVEPAFoDV7G+0Fw== X-Received: by 2002:a2e:a373:0:b0:2ec:12dd:d22f with SMTP id 38308e7fff4ca-2ec12ddd2e2mr64470371fa.34.1718712026387; Tue, 18 Jun 2024 05:00:26 -0700 (PDT) Received: from pony.mail.msk ([5.181.62.98]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2ec05c0701fsm17173921fa.45.2024.06.18.05.00.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 05:00:25 -0700 (PDT) To: tarantool-patches@dev.tarantool.org, Sergey Kaplun , Maxim Kokryashkin Date: Tue, 18 Jun 2024 15:00:09 +0300 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit 2/2][v2] cmake: fix warning 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 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" From: Sergey Bronnikov Since CMake 3.27 compatibility with versions of CMake older than 3.5 is deprecated [1]. CMake produces annoying warning on configuration stage: | 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 the Tarantool build system. However, we can set a (introduced in CMake 3.12, see [1]) and suppress a warning. means that this CMake version is known to work properly and will not result in any build errors rightaway for higher versions. Note, that a current CMake minimum required version in Tarantool is equal to 2.8, but is introduced in CMake 3.12 [1]. However, according to [1] 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 ". 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 [2]. Compatibility with 2.8.12 is needed for CMP0002 [3], see commit 049e296ee114 ("test: run LuaJIT tests via CMake"). 1. https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html 2. https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html#policy-settings 3. https://cmake.org/cmake/help/latest/policy/CMP0002.html --- CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 09fa172c..f12282c6 100644 --- 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 -- 2.34.1