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 54A37D1A081; Tue, 18 Jun 2024 15:00:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 54A37D1A081 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1718712045; bh=WFRTco2LHXo0sYwfd/0aYZEAH5HVPYhEdlq/TrxRbjQ=; 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=IwNkcR8vR9SYJQ8ayCAviNXfzcCdo05Ctq4xfE52O84BYOnsfN7+q6iji7CBsiI/c 2mSbJ7kfiKsoOU8cxLEkSQJNFymIQezL02wSeLxFurCZB9E8ubr7Tdf8v6V1pMtgbQ Nva82LKjlNfkYBI/56lI/K9tJDFc/9O3nj4inTd8= Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 6DA8AEB29FF for ; Tue, 18 Jun 2024 15:00:21 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6DA8AEB29FF Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2eaa89464a3so60931261fa.3 for ; Tue, 18 Jun 2024 05:00:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718712020; x=1719316820; 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=sXc5XbEoXf2zFLUSow7MBhmxljEyJK6twcUhUQ2Ef+E=; b=AJduuMzqQSN7aZ5xshV3JLPBOMuGGh0H3IK0Hjbg+oZsCA8W68MdHEp+1SZVgUQLzn 66F8QxMnJLXxN42jhuyhyFFzt/shw5dg4nmzDLqOA63Hx/0Pg1vCa2fj/4ZxRAaNsWwL nSnVgaZGPEPPaUkn7TzQBdHZ5hJAHDOjTBbh35H4hSa+RwB1bumK0sjxitUoFMJNRg6+ mzSKdghneyGXLmu9STJ3Ifecgzamif9OsdnN5sV2rIj+cwQcDGxDfDgGHOclP9bpwa+v 1wL/7sCgrhODcx5wSO8oqU7lt6SH09nN+XcAAcZWRPp6d/7O2w4pj7Ht94JJ5BcZU4LL dqaw== X-Gm-Message-State: AOJu0Yxoac+s95vTpG0Sjjar6VaGS5qVT8DSexCl2C4GeqNwy59UkrvO Up9otAoGRUei26NPljNf+51aiMMsZb7oD0zrszYZMszla53C+ge/D6vhdoWk X-Google-Smtp-Source: AGHT+IHb9JIub33WN7/Kh7GrKJ5K5gdeAIvZb21yK+CFfGAMK6M6L9sHOozH5VY9IRcNi31zSZgb7w== X-Received: by 2002:a2e:9bc7:0:b0:2eb:e7ba:f75f with SMTP id 38308e7fff4ca-2ec0e60d982mr85720491fa.48.1718712020234; Tue, 18 Jun 2024 05:00:20 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 05:00:19 -0700 (PDT) To: tarantool-patches@dev.tarantool.org, Sergey Kaplun , Maxim Kokryashkin Date: Tue, 18 Jun 2024 15:00:07 +0300 Message-Id: <803d41ef1a0fc68fb9ebdc2f04fd310776b77b24.1718706218.git.sergeyb@tarantool.org> 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 1/2][v2] cmake: set cmake_minimum_required only once 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 The commit 049e296ee114 ("test: run LuaJIT tests via CMake") introduced CMake build infrastructure and added `cmake_minimum_required` to each CMakeLists.txt in the project. However, it is not required, single `cmake_minimum_required` specified in a root CMakeLists.txt is more than enough. The patch left `cmake_minimum_required` in a root CMakeLists.txt and removes in other CMakeLists.txt below in a source tree. --- CMakeLists.txt | 2 -- etc/CMakeLists.txt | 3 --- src/CMakeLists.txt | 3 --- src/host/CMakeLists.txt | 3 --- test/CMakeLists.txt | 3 --- test/LuaJIT-tests/CMakeLists.txt | 3 --- test/LuaJIT-tests/src/CMakeLists.txt | 3 --- test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt | 3 --- test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt | 3 --- test/lua-Harness-tests/CMakeLists.txt | 3 --- test/tarantool-tests/CMakeLists.txt | 3 --- tools/CMakeLists.txt | 3 --- 12 files changed, 35 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2355ce17..09fa172c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -339,8 +339,6 @@ option(LUAJIT_USE_TEST "Generate target" ON) # As a result the minimal required CMake version is set to 3.1. # For more info, see CMake Release notes for 3.1 version. # https://cmake.org/cmake/help/latest/release/3.1.html#commands -# XXX: This option is moved below source tree processing since -# the default binary target need to be generated. set(LUAJIT_TEST_BINARY ${LUAJIT_BINARY} CACHE STRING "Lua implementation to be used for tests. Default is 'luajit'." ) diff --git a/etc/CMakeLists.txt b/etc/CMakeLists.txt index d54fa794..7715c3fa 100644 --- a/etc/CMakeLists.txt +++ b/etc/CMakeLists.txt @@ -1,8 +1,5 @@ # Building supplementary materials for LuaJIT. -# See the rationale in the root CMakeLists.txt. -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) - set(LUAJIT_PC_PREFIX ${CMAKE_INSTALL_PREFIX}) if(CMAKE_LIBRARY_ARCHITECTURE) set(LUAJIT_PC_MULTILIB "lib/${CMAKE_LIBRARY_ARCHITECTURE}") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 03338306..b104264e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,9 +3,6 @@ # Copyright (C) 2020-2021 LuaVela Authors. # Copyright (C) 2015-2020 IPONWEB Ltd. -# See the rationale in the root CMakeLists.txt. -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) - enable_language(ASM) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/host/CMakeLists.txt b/src/host/CMakeLists.txt index 1ce3e224..83b4658b 100644 --- a/src/host/CMakeLists.txt +++ b/src/host/CMakeLists.txt @@ -1,8 +1,5 @@ # Building the toolchain for LuaJIT VM preprocessing. -# See the rationale in the root CMakeLists.txt. -cmake_minimum_required(VERSION 3.1 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 19726f5a..0db2dd8b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,8 +1,5 @@ # Running various test suites against LuaJIT. -# See the rationale in the root CMakeLists.txt. -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) - include(MakeLuaPath) find_program(LUACHECK luacheck) diff --git a/test/LuaJIT-tests/CMakeLists.txt b/test/LuaJIT-tests/CMakeLists.txt index b8e4dfc4..c8a82a6b 100644 --- a/test/LuaJIT-tests/CMakeLists.txt +++ b/test/LuaJIT-tests/CMakeLists.txt @@ -1,6 +1,3 @@ -# See the rationale in the root CMakeLists.txt -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) - add_subdirectory(src) make_lua_path(LUA_CPATH diff --git a/test/LuaJIT-tests/src/CMakeLists.txt b/test/LuaJIT-tests/src/CMakeLists.txt index 2f90da86..00e58b80 100644 --- a/test/LuaJIT-tests/src/CMakeLists.txt +++ b/test/LuaJIT-tests/src/CMakeLists.txt @@ -1,6 +1,3 @@ -# See the rationale in the root CMakeLists.txt. -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) - # Use `lib` prefix for loading via FFI and `require()`. AddTestLib(libctest libctest.c) enable_language(CXX) diff --git a/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt b/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt index 0942c62d..30054206 100644 --- a/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt +++ b/test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt @@ -1,9 +1,6 @@ # Test suite that has been added from PUC-Rio Lua 5.1 test archive # 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) - # XXX: There are two ways to set up the proper environment # described in the suite's README: # * set LUA_PATH to "?;./?.lua" 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..d4eb365a 100644 --- a/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt +++ b/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt @@ -1,9 +1,6 @@ # Test suite that has been added from PUC-Rio Lua 5.1 test archive # 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) - # Build additional C libraries for tests. AddTestLib(lib1 lib1.c) AddTestLib(lib11 lib1.c lib11.c) diff --git a/test/lua-Harness-tests/CMakeLists.txt b/test/lua-Harness-tests/CMakeLists.txt index 8dea30b7..526d9824 100644 --- a/test/lua-Harness-tests/CMakeLists.txt +++ b/test/lua-Harness-tests/CMakeLists.txt @@ -1,9 +1,6 @@ # Test suite that has been added from lua-Harness test suite # 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) - # Tests create temporary files (see 303-package.t and 411-luajit.t # for example) to be required. Also, they require some files from # the original test source directory. diff --git a/test/tarantool-tests/CMakeLists.txt b/test/tarantool-tests/CMakeLists.txt index 56660932..fd6cecec 100644 --- a/test/tarantool-tests/CMakeLists.txt +++ b/test/tarantool-tests/CMakeLists.txt @@ -1,9 +1,6 @@ # Test suite that has been moved from Tarantool repository in # 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) - add_custom_target(tarantool-tests-libs DEPENDS libluajit ) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 695c079a..f8e1ab3b 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -3,9 +3,6 @@ # Copyright (C) 2020-2021 LuaVela Authors. # Copyright (C) 2015-2020 IPONWEB Ltd. -# See the rationale in the root CMakeLists.txt. -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) - set(LUAJIT_TOOLS_DEPS) if(LUAJIT_DISABLE_MEMPROF) -- 2.34.1