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 DD9316ECE3; Wed, 15 Jun 2022 11:55:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DD9316ECE3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1655283342; bh=U2FtkRwN0FalpiTlvDTZnFe6ougvKrTVn8u0PGYK4uA=; 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=FtsxNx+MujpsR+5nPjeWKQrnl/wOOChFCap2Ig+T50aKbhLe20zViwSt6eUZykAzX Bjt9ddRXoFLuljhLtF1R/QHZ8ZAxPxDT6zRkVuiqLEXbNpk+7xhjHQp0jcpZtOTA7I hv1P+MOjUmalhaPTytwqqSah6c7GHFUOl+sUMoy0= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (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 CFC476ECE3 for ; Wed, 15 Jun 2022 11:55:20 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CFC476ECE3 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1o1Oo4-0004RU-4d; Wed, 15 Jun 2022 11:55:20 +0300 Date: Wed, 15 Jun 2022 11:48:13 +0300 To: Sergey Bronnikov Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD97D44297578DBEB86B3A538BB17544FF41665133A368B44B6182A05F538085040D97740906873EC4A7C15D46ECB51D368FC225AD6E20D16FB45B8D5F3D36E1188 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7569E19AE644B2ACAEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063700ADE00200597A808638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D87422437FEAFCA14F848E918BEBFD7D3D117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC60CDF180582EB8FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD1828451B159A507268D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B67ECBC18655D52CDF089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-8FC586DF: 6EFBBC1D9D64D975 X-C1DE0DAB: 9604B64F49C60606AD91A466A1DEF99B296C473AB1E14218C6CDE5D1141D2B1C7BFBBBA65E494AAE85D492E07F9AFE21BD54D6B59F81F412AD91A466A1DEF99B296C473AB1E14218B936CB490224F2464EEA7BD89490CAC0EDDA962BC3F61961 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3473688ED311681BF0D18CBBC0B9DAE6DBE64C98F9DF50F5B96C90E7F9E376B84D291F67876ADB003A1D7E09C32AA3244C1F3DC7CF142A6BDB1C273CE2C5DC891CD9ADFF0C0BDB8D1F927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojF9WnY+1VDr5nyxrgg+V0MQ== X-Mailru-Sender: 689FA8AB762F7393CC2E0F076E87284E03DDA6E0ED8FF87F639C22E1C868D075A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E3365FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [v2][PATCH 4/5] build/ninja: create file lists outside of cmake commands 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, Thanks for the patch! LGTM as trivial, but please consider nits below. JFYI, we're not using complex prefixes in LuaJIT, so feel free to use just build and mention Ninja specifics within the rest of commit subject. On 02.06.22, Sergey Bronnikov wrote: > Patch adds a last change required for building LuaJIT with Ninja - using > glob inside CMake commands (add_custom_command and > set_source_files_properties) breaks buildng with Ninja. > I believe, the part below is much more suitable for the last patch in the series, since we want to enable Ninja especially for CI purposes. > By default CMake generates files suitable for building a project with > Make. However, it allows to generate files for Ninja too. Ninja [1] may > build project a bit faster than Make, see comparison in [2]. > > How-to build with Ninja: > > $ cmake -G Ninja -B build -S . > $ cmake --build build --parallel > > 1. https://ninja-build.org/ > 2. https://mesonbuild.com/Simple-comparison.html > --- > src/host/CMakeLists.txt | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/src/host/CMakeLists.txt b/src/host/CMakeLists.txt > index e01db87d..1ce3e224 100644 > --- a/src/host/CMakeLists.txt > +++ b/src/host/CMakeLists.txt > @@ -25,11 +25,12 @@ set(DYNASM_DIR ${PROJECT_SOURCE_DIR}/dynasm) > set(DYNASM_DASC "${LUAJIT_SOURCE_DIR}/vm_${DYNASM_ARCH}.dasc") > set(DYNASM ${HOST_LUA} ${DYNASM_DIR}/dynasm.lua) > > +file(GLOB DYNASM_LUA ${DYNASM_DIR}/*.lua) > add_custom_command( > COMMENT "Generating buildvm_arch.h" > OUTPUT buildvm_arch.h > COMMAND ${DYNASM} ${DYNASM_FLAGS} -o buildvm_arch.h ${DYNASM_DASC} > - DEPENDS ${MINILUA} ${DYNASM_DASC} ${DYNASM_DIR}/*.lua > + DEPENDS ${MINILUA} ${DYNASM_DASC} ${DYNASM_LUA} Minor: IMHO, DYNASM_LUA_FILES looks better here. > WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} > ) > > @@ -47,8 +48,9 @@ add_executable(buildvm EXCLUDE_FROM_ALL > # *sources* list. > buildvm_arch.h > ) > +file(GLOB DASM_HEADERS ${DYNASM_DIR}/dasm_*.h) > set_source_files_properties(buildvm.c PROPERTIES > - OBJECT_DEPENDS ${DYNASM_DIR}/dasm_*.h > + OBJECT_DEPENDS "${DASM_HEADERS}" Minor: Why have you enclosed this variable in the quotes, but the one above have not? > ) > set_target_properties(buildvm PROPERTIES > COMPILE_FLAGS "${HOST_C_FLAGS} ${TARGET_C_FLAGS}" > -- > 2.25.1 > -- Best regards, IM