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 6EDCB686CA; Thu, 4 Feb 2021 02:22:54 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6EDCB686CA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1612394574; bh=bEAVqgOOAbRt04eEWqNlrELm2NowUJHGqRYAHuA/ycs=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=q+k9Wu474CCuXmnDkEbP+ffaCWrigbI/NKP7IbliReAw7e9pG7R6xTIMI/aigB55Q l2CKncR9HxrwstRCA3WQWXXXUO3D9GOEVPnN+jmbfXUq3oajuLFdTk3VrJ6ydY69FF dXoJDaHihQa67x3o4ihQiMb7ACmKUeVd2wUeGDCM= Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 C1737686CA for ; Thu, 4 Feb 2021 02:22:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C1737686CA Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1l7RTZ-0008Pr-UV; Thu, 04 Feb 2021 02:22:22 +0300 To: Sergey Kaplun , Timur Safin Date: Thu, 4 Feb 2021 02:22:15 +0300 Message-Id: X-Mailer: git-send-email 2.25.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD953AC099BC0052A9CAEF2BF42A2A7729330F8028A4C0D8125182A05F53808504070EAC082888D1F1AF59DD49C9DEAF8C07FCC645164F729F1F3ED80C0915DBE3B X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7C6068CE86C2B75F5EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637782358EF9635990EEA1F7E6F0F101C674E70A05D1297E1BBC6CDE5D1141D2B1C5FCEE174EB8C4563C82726B58120DC063497F9F8FDEA65589FA2833FD35BB23D9E625A9149C048EE33AC447995A7AD18CB629EEF1311BF91D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8BF1175FABE1C0F9B6A471835C12D1D977C4224003CC836476EC64975D915A344093EC92FD9297F6718AA50765F790063784234279671F8D0CA7F4EDE966BC389F395957E7521B51C24C7702A67D5C33162DBA43225CD8A89FBFBFE0634520CEB9262FEC7FBD7D1F5BB5C8C57E37DE458B4C7702A67D5C3316FA3894348FB808DB48C21F01D89DB561574AF45C6390F7469DAA53EE0834AAEE X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C823F58AE0C7795A95347F0DDCC5F916A5E52CFBE2093FCA49C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EF31C0090ACECF247D699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34047E322BFAFD69BD06B108DE9671C403EDC4483419D7A6A05DDC23B40C30F1E115F02AA371D0CD6C1D7E09C32AA3244CE37DCB21DD2A97FCE8F6B9A276976745F2F5F14F68F1805B927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojSeaWuhK039JALGoI3j9X0w== X-Mailru-Sender: 689FA8AB762F73936BC43F508A06382236E2E792597412C931A66D5F5230D6C7A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH 1/3] build: fix lua.c file generation 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" If Lua source path given to function is relative, the output file is generated in the binary directory. At the same time if the given path to be compiled to *.lua.c is absolute, the output file is generated in source directory instead of the binary one. This patch fixes the latter case providing the valid behaviour for out of source build type. Needed for #4862 Signed-off-by: Igor Munkin --- cmake/utils.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/utils.cmake b/cmake/utils.cmake index eaec821b3..6d6960468 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -40,9 +40,11 @@ endmacro(set_source_files_compile_flags) # A helper function to compile *.lua source into *.lua.c sources function(lua_source varname filename) if (IS_ABSOLUTE "${filename}") + string (REPLACE "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" + genname "${filename}") set (srcfile "${filename}") - set (tmpfile "${filename}.new.c") - set (dstfile "${filename}.c") + set (tmpfile "${genname}.new.c") + set (dstfile "${genname}.c") else(IS_ABSOLUTE "${filename}") set (srcfile "${CMAKE_CURRENT_SOURCE_DIR}/${filename}") set (tmpfile "${CMAKE_CURRENT_BINARY_DIR}/${filename}.new.c") -- 2.25.0