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 40A696F153; Fri, 2 Sep 2022 15:09:58 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 40A696F153 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1662120598; bh=idu0rPPDabfXhzEikW/4lXEnFo/yWPqg6TX2/8gJVas=; 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=GpAYNLh/Vmjz7dv3FP4ec6yLMQ5qpHPet8wATKtJrIuVizUbmIEakFkL10uRb7b/G JcgI2dl24QNHSLZmZ0VLC9aUGxiLHR5bwxV1hJqtUcvxXNl+2uYbJ2Q2iYclbxG31B NTBQctHt4kX35gFh9I22nTeg0ZQAfGtMou5wFoBw= Received: from smtp16.mail.ru (smtp16.mail.ru [94.100.176.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 0EF666F153 for ; Fri, 2 Sep 2022 15:09:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0EF666F153 Received: by smtp16.mail.ru with esmtpa (envelope-from ) id 1oU5UU-0000hn-C0; Fri, 02 Sep 2022 15:09:42 +0300 Message-ID: Date: Fri, 2 Sep 2022 15:09:42 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US To: Igor Munkin References: <1d05bbecc9c9ae57250ec563e202a8e103f86fa4.1660216002.git.imun@tarantool.org> <43afa059-82e9-422e-2636-f063bba9f847@tarantool.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9D8E1125CB37184E1C7694BA8CA54B48E14788A9DC669AB301867C24CE74E72BB5FE18E9CBFBE7C0755F07B49BB7FBAC29C772112AE5C46726E93803C84FDDF7635AA1534FA60CA86 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7370F4F695FFFC24BEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637EF59B520676799BC8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8EF990FECB6AB374A7247F8CAC0CF981F117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8B3733B5EC72352B9FA471835C12D1D977C4224003CC836476EB9C4185024447017B076A6E789B0E975F5C1EE8F4F765FCA26C8913F777CCC43AA81AA40904B5D9CF19DD082D7633A078D18283394535A93AA81AA40904B5D98AA50765F7900637FC9C2F5BBECBEBA6D81D268191BDAD3D698AB9A7B718F8C4D1B931868CE1C5781A620F70A64A45A98AA50765F79006372E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89F83C798A30B85E16B6D8C47C27EEC5E9FB5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 9604B64F49C60606AD91A466A1DEF99B296C473AB1E142185AC9E3593CE4B31AB1881A6453793CE9274300E5CE05BD4401A9E91200F654B0C7A0BC55FA0FE5FC4140184F620E9DF67FD3956CE6184671F4BFE9937DA722B2B1881A6453793CE9C32612AADDFBE06133F7A9E5587C79A693EDB24507CE13387DFF0A840B692CF8 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34C53D1911AD7E4199FD6E916C7B84750D9F37CAD5D4A800BB42714E433D4061B4A4C6A2C8F83EB2C81D7E09C32AA3244CD443918FCBCFF9966F8113B533E99F4DB038C9161EF167A1FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojAGeMpyYxfpEDre8RaRe7eA== X-Mailru-Sender: 11C2EC085EDE56FAC71737E9F694C0DE40A679EB1745938C8ED90AB0D401A58AADEBD33CC5CDFF11645D15D82EE4B272BD6E4642A116CA93524AA66B5ACBE6721EF430B9A63E2A504198E0F3ECE9B5443453F38A29522196 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 2/8] test: introduce MakeLuaPath.cmake helper 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" LGTM On 31.08.2022 18:07, Igor Munkin wrote: > Sergey, > > Thanks for you review! > > On 15.08.22, Sergey Bronnikov wrote: >> Igor, thanks for the patch! See my comments inline. >> >> On 11.08.2022 14:17, Igor Munkin wrote: >>> While extending test suites it is often required to append additional >>> path where Lua or Lua-C auxiliary modules are located to LUA_PATH or >>> LUA_CPATH environment variables. Due to insane semicolon interpolation >>> in CMake strings (that converts such string to a list as a result), we >>> need to escape semicolon in LUA_PATH/LUA_CPATH strings while building >>> the resulting value. >>> >>> After the years of struggling MakeLuaPath.cmake module is introduced to >>> make LUA_PATH and LUA_CPATH definition convenient with >>> helper. This function takes all paths given as a variable list argument, >>> joins them in a reverse order by a semicolon and yields the resulting >>> string to a specified CMake variable. >>> >>> Signed-off-by: Igor Munkin >>> --- >>> cmake/MakeLuaPath.cmake | 46 +++++++++++++++++++++++ >>> test/CMakeLists.txt | 2 + >>> test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt | 8 +++- >>> test/lua-Harness-tests/CMakeLists.txt | 16 +++++--- >>> test/tarantool-tests/CMakeLists.txt | 28 ++++++++------ >>> 5 files changed, 81 insertions(+), 19 deletions(-) >>> create mode 100644 cmake/MakeLuaPath.cmake >>> >>> diff --git a/cmake/MakeLuaPath.cmake b/cmake/MakeLuaPath.cmake >>> new file mode 100644 >>> index 00000000..9a5a3bb8 >>> --- /dev/null >>> +++ b/cmake/MakeLuaPath.cmake > > >>> + >>> + # FIXME: if we update to CMake >= 3.5, can remove this line. >> I would replace comment with condition that will check CMake version >> >> and will fail when CMake >= 3.5: >> >> |if (CMAKE_VERSION VERSION_GREATER_EQUAL 35) | >> >>    message(FATAL_ERROR "Please remove snippet for CMake < 3.5") >> >> endif() > I doubt this is a working solution. The comment means, that there is no > need to include a separate module if CMake to be used is greater than > 3.5. With your code, fatal error is raised in that case. I have CMake > 3.20 on my local machine and LuaJIT fails to be built with your check > added (I've fixed the typo in the version number). > > Ignoring for now. > >> >>> + include(CMakeParseArguments) > >