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 9AB036EFDA; Thu, 2 Jun 2022 16:24:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9AB036EFDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1654176254; bh=5qyZ/iufbg1bX/8av7qEhN4CiTluIQidkGDwK0qqnII=; 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=WcQuAQh4xDPAB7H5HjFezKIkT2SmMfFVr7H8efh7+YC+m0St0tVXwt4qwD08cmYHk DzIFMxlwT4wFKJ4SEGu2X2hDr+np4APpVw60MV9FQmjME/N+PUy2Vk09ZZeRN7T9Wb 483xGmYsIdqqBfdYPKXbzBpXl/eMwgXLULWuMp04= Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (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 3B55370658 for ; Thu, 2 Jun 2022 16:22:55 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3B55370658 Received: by mail-lf1-f53.google.com with SMTP id l30so7804837lfj.3 for ; Thu, 02 Jun 2022 06:22:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iGN3SRMePM36LQQLYjtCh8o07PPmXJKVsIpsiMDlIzU=; b=de+jmlQWXWlTiz9T4qLnLJAl1fpNJCGGLJFXRLHQizoLAB00P2Rlm5wCU0E8Jehkpw akGGzuX4Vvqi7M7FkeFIQUoK9kynjZfmxSuhRq+f6XSA5CCMMuFBK70+CrUHftxUUaDr abC3Vc6rnFVCS4uVtiYcD1o6H7hcLI4RXidsmC7UDgAOSogNvGDbRkDCwn6ZVTzPiS5A cb9tLKfW3wa12H9l9L/RtZiiKcFMMq5aL5DW3PEWoIDxI1dZ7mmnbiwsVcwXS1c1oap0 /Bytu4gS0Dan4XO7LUJlEWxmx293geRCQs8+AhhehD4mDUaRc9NXYYe/7LwPv/co4r2F 1wUw== X-Gm-Message-State: AOAM530y9Ra8xE7Lrqoy4oIsMhYpF+08i0/ZhR0PLOUv7qfo69nbbTe6 y7PAEl9XC9CDenuxzQyxE8WPIJHKWsA= X-Google-Smtp-Source: ABdhPJwRraHhOeyf+QUWX4EwusvzQGkZMOkKWc4VU9cL8yjvQ5ZdaDeRrwEo5kVl3fz3h7ZTigW6zQ== X-Received: by 2002:a05:6512:2249:b0:478:f926:ad7 with SMTP id i9-20020a056512224900b00478f9260ad7mr8645190lfu.511.1654176174541; Thu, 02 Jun 2022 06:22:54 -0700 (PDT) Received: from pony.mail.msk ([2a00:1148:b0ba:16:2894:da3a:9c3f:b06]) by smtp.gmail.com with ESMTPSA id c21-20020a056512105500b00477932b5d8bsm1022479lfb.199.2022.06.02.06.22.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jun 2022 06:22:54 -0700 (PDT) X-Google-Original-From: Sergey Bronnikov To: tarantool-patches@dev.tarantool.org Date: Thu, 2 Jun 2022 16:22:51 +0300 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [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: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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. 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} 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}" ) set_target_properties(buildvm PROPERTIES COMPILE_FLAGS "${HOST_C_FLAGS} ${TARGET_C_FLAGS}" -- 2.25.1