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 B37AC6ECED; Mon, 14 Sep 2026 15:34:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B37AC6ECED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1789389263; bh=xyp8qL+qIj2mxNK8mcJqXss617qu0qfwqP8BUP8Dk+E=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=wAiwFtKd88V2dTmYMz2y+UOOvZDwo67lEKk0sIx7hErxuiP+eS0k4fRzROLsiE0wc lm5AkbPFwXjKfCHYN/nHg1Z5E6bcyQOM5TX/1aG6P8k+AO8odkr9Yhlo7A35ykOmw9 4QBiMp9mfbfg8wv2lvugrIefovNE5j2ag0dLAfu8= Received: from send35.i.mail.ru (send35.i.mail.ru [89.221.237.130]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 6B1806ECED for ; Mon, 14 Sep 2026 15:34:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6B1806ECED Received: by exim-smtp-5d69b54bdd-6scg8 with esmtpa (envelope-from ) id 1x65t7-00000000J2b-1xE0; Mon, 14 Sep 2026 15:34:21 +0300 Message-ID: <98fb8200-96ea-4778-beaa-8efa18de1ffb@tarantool.org> Date: Mon, 14 Sep 2026 15:34:20 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Alexander Turenko , Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org References: <783b19798eebe5c8cb7406a3f0ee052fddd4c9eb.1789256599.git.alexander.turenko@tarantool.org> Content-Language: en-US In-Reply-To: <783b19798eebe5c8cb7406a3f0ee052fddd4c9eb.1789256599.git.alexander.turenko@tarantool.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailru-Src: smtp X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD98DB65506D2E90760552BF3BFC0AA04ED2FF99E2B8294CDF41313CFAB8367EF908E2BE116634AD74D34BBFC62FC0C5CB88E7FD94675F33565E69B5C4F0AB45D4CC087423FE21A41BBE5719F5EA8C3A75A X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78EDA1DD9981EFADEEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB55337566562BCE9B9754B08E1762AA6907FA99BCB4521E8866A1316CF10D0849DCC8B983389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C078FCF50C7EAF9C588941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6AEEA5BB16A939343CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C2249CA7DD71A7B3575AE76E601842F6C81A12EF20D2F80756B5FB606B96278B59C4276E601842F6C81A127C277FBC8AE2E8B9AE8AC56DFFD6BB73AA81AA40904B5D99C9F4D5AE37F343AD1F44FA8B9022EA23BBE47FD9DD3FB595F5C1EE8F4F765FC72CEEB2601E22B093A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE493B89ED3C7A62817814E672349037D5FA5C4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A5B0BAF54EC6633C365002B1117B3ED69645F0752F4B373AC74869453249F34FA43610D81D389A125CDE35189EBF2DEA28FEA14CD2CD220BB99C5DF10A05D560A9880EC71AF561E0AAD9143641EC25BB39D1AAE889B2A4D82D X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE191716CD42B3DD1D34C77DD89D51EBB774225B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D659D02D92F19A27D871643F92EFFA8374D9C20FD73C64F08336E55185585E0FC315CD60DAA8B63CBF86B8341EE9D5BE9A0A3AEA74CA7E0111EE3D8A977891DA9F40D4F72B0AD20A3FEA6536EB022892E5344C41F94D744909CE2512F26BEC029E55448553D2254B8D95CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXOcIETfglQORZ0zpDET4Zrk3igikrdHlWEs6DubInWGRe+eya20PhEY= X-Mailru-Sender: C4F68CFF4024C8867DFDF7C7F2588458D6834D09A967D812601A8E04A89F3FFCFF3D96DCE7E510C9DFD0E1CAA7392870645D15D82EE4B272BD6E4642A116CA93524AA66B5ACBE6721EF430B9A63E2A504198E0F3ECE9B5443453F38A29522196 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH] build: fix CMP0175 warnings 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" Hi, Alexander! thanks for the patch! LGTM Sergey On 9/13/26 02:49, Alexander Turenko via Tarantool-patches wrote: > The following pattern was used to add custom `make LuaJIT-foo` commands: > > ```cmake > add_custom_target(${PROJECT_NAME}-foo DEPENDS <...>) > add_custom_command(TARGET ${PROJECT_NAME}-foo > COMMAND <...> > ) > ``` > > However, recent cmake versions (verified on 4.3.4) warns about the > `add_custom_command` syntax (quoted [1]): > >> `add_custom_command()` rejects invalid arguments. >> >> <...> >> >> The `TARGET` form requires exactly one of `PRE_BUILD`, `PRE_LINK`, or >> `POST_BUILD` to be given. Previously, if none were given, `POST_BUILD` >> was assumed, or if multiple keywords were given, the last one was >> used. > The fix could be add the `POST_BUILD` keyword. However, it is more > natural to just use `add_custom_target` with `COMMAND` instead: > > ```cmake > add_custom_target(${PROJECT_NAME}-foo > COMMAND <...> > DEPENDS <...> > ) > ``` > > The same change is proposed to tarantool: [2]. > > [1]: https://cmake.org/cmake/help/latest/policy/CMP0175.html > [2]: https://github.com/tarantool/tarantool/pull/13177 > --- > cmake/CodeCoverage.cmake | 3 +-- > cmake/CodeSpell.cmake | 5 ++--- > test/CMakeLists.txt | 14 ++++---------- > test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt | 4 ++-- > 4 files changed, 9 insertions(+), 17 deletions(-) > > diff --git a/cmake/CodeCoverage.cmake b/cmake/CodeCoverage.cmake > index 51345f1f..5c45bd11 100644 > --- a/cmake/CodeCoverage.cmake > +++ b/cmake/CodeCoverage.cmake > @@ -16,8 +16,7 @@ if(NOT GCOVR OR NOT GCOV) > endif() > > file(MAKE_DIRECTORY ${COVERAGE_DIR}) > -add_custom_target(${PROJECT_NAME}-coverage) > -add_custom_command(TARGET ${PROJECT_NAME}-coverage > +add_custom_target(${PROJECT_NAME}-coverage > COMMENT "Building coverage report" > COMMAND > ${GCOVR} > diff --git a/cmake/CodeSpell.cmake b/cmake/CodeSpell.cmake > index 31aa0a02..8592551a 100644 > --- a/cmake/CodeSpell.cmake > +++ b/cmake/CodeSpell.cmake > @@ -35,9 +35,8 @@ set(CODESPELL_WHITELIST > > set(IGNORE_WORDS ${PROJECT_SOURCE_DIR}/.codespell-ignore-words.txt) > > -add_custom_target(${PROJECT_NAME}-codespell) > if(CODESPELL) > - add_custom_command(TARGET ${PROJECT_NAME}-codespell > + add_custom_target(${PROJECT_NAME}-codespell > COMMENT "Running codespell" > COMMAND > ${CODESPELL} > @@ -51,7 +50,7 @@ else() > set(STR1 "codespell is not found,") > set(STR2 "so ${PROJECT_NAME}-codespell target is dummy") > string(CONCAT WARN_MSG "${STR1} ${STR2}") > - add_custom_command(TARGET ${PROJECT_NAME}-codespell > + add_custom_target(${PROJECT_NAME}-codespell > COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red ${WARN_MSG} > COMMENT ${WARN_MSG} > ) > diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt > index 26b15892..efdfa3d5 100644 > --- a/test/CMakeLists.txt > +++ b/test/CMakeLists.txt > @@ -15,9 +15,6 @@ if(LUACHECK) > set(LUACHECK_RC ${LUACHECK_SOURCE_DIR}/.luacheckrc) > file(GLOB_RECURSE LUACHECK_DEPS ${LUACHECK_SOURCE_DIR}/*.lua) > add_custom_target(${PROJECT_NAME}-luacheck > - DEPENDS ${LUACHECK_RC} ${LUACHECK_DEPS} > - ) > - add_custom_command(TARGET ${PROJECT_NAME}-luacheck > COMMENT "Running luacheck static analysis" > COMMAND > ${LUACHECK} ${LUACHECK_SOURCE_DIR} > @@ -31,10 +28,10 @@ if(LUACHECK) > # the working directory, hence luacheck should be run in the > # project root directory. > WORKING_DIRECTORY ${LUACHECK_SOURCE_DIR} > + DEPENDS ${LUACHECK_RC} ${LUACHECK_DEPS} > ) > else() > - add_custom_target(${PROJECT_NAME}-luacheck) > - add_custom_command(TARGET ${PROJECT_NAME}-luacheck > + add_custom_target(${PROJECT_NAME}-luacheck > COMMENT "`luacheck' is not found, so ${PROJECT_NAME}-luacheck target is dummy" > ) > endif() > @@ -45,19 +42,16 @@ if(FLAKE8) > set(FLAKE8_RC ${FLAKE8_SOURCE_DIR}/.flake8rc) > file(GLOB_RECURSE FLAKE8_DEPS ${FLAKE8_SOURCE_DIR}/*.py) > add_custom_target(${PROJECT_NAME}-flake8 > - DEPENDS ${FLAKE8_DEPS} > - ) > - add_custom_command(TARGET ${PROJECT_NAME}-flake8 > COMMENT "Running flake8 static analysis" > COMMAND > ${FLAKE8} ${FLAKE8_DEPS} > --config ${FLAKE8_RC} > --jobs ${CMAKE_BUILD_PARALLEL_LEVEL} > WORKING_DIRECTORY ${FLAKE8_SOURCE_DIR} > + DEPENDS ${FLAKE8_DEPS} > ) > else() > - add_custom_target(${PROJECT_NAME}-flake8) > - add_custom_command(TARGET ${PROJECT_NAME}-flake8 > + add_custom_target(${PROJECT_NAME}-flake8 > COMMENT "`flake8' is not found, so ${PROJECT_NAME}-flake8 target is dummy" > ) > endif() > diff --git a/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt b/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt > index d4eb365a..e75b9e6d 100644 > --- a/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt > +++ b/test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt > @@ -24,11 +24,11 @@ list(APPEND TESTLIBS ${LIB2COPY}) > # subdirectory "libs/P1", to be used by tests. > # Instead of tracking empty directory with some anchor-file for > # git, create this directory via CMake. > -add_custom_target(PUC-Rio-Lua-5.1-tests-prepare DEPENDS ${TESTLIBS}) > -add_custom_command(TARGET PUC-Rio-Lua-5.1-tests-prepare > +add_custom_target(PUC-Rio-Lua-5.1-tests-prepare > COMMENT "Create directory for PUC-Rio Lua 5.1 tests" > COMMAND ${CMAKE_COMMAND} -E make_directory P1 > WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} > + DEPENDS ${TESTLIBS} > ) > > # vim: expandtab tabstop=2 shiftwidth=2