From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp61.i.mail.ru (smtp61.i.mail.ru [217.69.128.41]) (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 EC2E7469710 for ; Wed, 13 May 2020 10:40:01 +0300 (MSK) Date: Wed, 13 May 2020 10:40:00 +0300 From: "Alexander V. Tikhonov" Message-ID: <20200513074000.GA971@hpalx> References: <20200425071730.hva3scyfskaraukr@tkn_work_nb> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200425071730.hva3scyfskaraukr@tkn_work_nb> Subject: Re: [Tarantool-patches] [PATCH v2 2/3] gitlab-ci: add out-of-source build List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Turenko Cc: tarantool-patches@dev.tarantool.org Hi Alexander, thanks a lot for the review, please check my comments below. On Sat, Apr 25, 2020 at 10:17:30AM +0300, Alexander Turenko wrote: > > index 5f8b15a63..753b7293a 100644 > > --- a/cmake/BuildLibCURL.cmake > > +++ b/cmake/BuildLibCURL.cmake > > @@ -56,10 +56,10 @@ macro(curl_build) > > DOWNLOAD_DIR ${LIBCURL_BINARY_DIR} > > TMP_DIR ${LIBCURL_BINARY_DIR}/tmp > > STAMP_DIR ${LIBCURL_BINARY_DIR}/stamp > > - BINARY_DIR ${LIBCURL_BINARY_DIR} > > + BINARY_DIR ${LIBCURL_BINARY_DIR}/curl > > Don't get what is the problem you try to solve here. > The path to curl binaries is set here, which later used for configuring/building/installing and no need to write it there each time. > > CONFIGURE_COMMAND > > - cd && ./buildconf && > > - cd && /configure > > + rm -rf && cp -rf && > > + cd && ./buildconf && ./configure > > Will not it lead to full curl rebuild on each `make` run when something > changed within the repo? Right, I've changed it to cmake in separate commit with issue #4968, to be able to use Out-Of-Source build. > > > # Pass the same toolchain as is used to build > > # tarantool itself, because they can be > > # incompatible. > > diff --git a/cmake/utils.cmake b/cmake/utils.cmake > > index 3ab2d3ff2..6044ea7c0 100644 > > --- a/cmake/utils.cmake > > +++ b/cmake/utils.cmake > > @@ -70,9 +70,9 @@ endfunction() > > > > function(bin_source varname srcfile dstfile) > > set(var ${${varname}}) > > - set(${varname} ${var} ${dstfile} PARENT_SCOPE) > > + set(${varname} ${var} "${CMAKE_BINARY_DIR}/${dstfile}" PARENT_SCOPE) > > It is better to sink this line down below set(dstfile, ...). > Sure, corrected, as suggested. > > set (srcfile "${CMAKE_CURRENT_SOURCE_DIR}/${srcfile}") > > - set (dstfile "${CMAKE_CURRENT_SOURCE_DIR}/${dstfile}") > > + set (dstfile "${CMAKE_BINARY_DIR}/${dstfile}") > > Why not CMAKE_CURRENT_BINARY_DIR? Now path to a source file is > calculated relative to a currently processed directory, but path to a > destination file is relative to a project binary directory that looks > lopsided. Sure, corrected, as suggested. > > > diff --git a/src/box/CMakeLists.txt b/src/box/CMakeLists.txt > > index c931ecdfe..51b0006b1 100644 > > --- a/src/box/CMakeLists.txt > > +++ b/src/box/CMakeLists.txt > > @@ -23,7 +23,7 @@ lua_source(lua_sources lua/xlog.lua) > > lua_source(lua_sources lua/key_def.lua) > > lua_source(lua_sources lua/merger.lua) > > set(bin_sources) > > -bin_source(bin_sources bootstrap.snap bootstrap.h) > > +bin_source(bin_sources bootstrap.snap src/box/bootstrap.h) > > Note: I guess it will not be needed if we'll use > CMAKE_CURRENT_BINARY_DIR in bin_source() function. > Right, after that correction no need in this change. > > > > add_custom_target(box_generate_lua_sources > > WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src/box > > @@ -32,6 +32,7 @@ set_property(DIRECTORY PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${lua_sources}) > > > > include_directories(${ZSTD_INCLUDE_DIRS}) > > include_directories(${CMAKE_BINARY_DIR}/src/box/sql) > > +include_directories(${CMAKE_BINARY_DIR}/src/box) > > Generating of bootstrap.h into a binary directory is the nice change! Right, temporary change, forgot to remove.