[Tarantool-patches] [v2][PATCH 3/5] build/ninja: rename default target

Sergey Bronnikov estetus at gmail.com
Thu Jun 2 16:22:43 MSK 2022


Default target name and target for building CLI have the same name.
It breaks Ninja build:

ninja: Entering directory `build/'
ninja: error: build.ninja:1656: multiple rules generate src/luajit [-w
dupbuild=err]

Patch renames default target name to avoid conflict.
---
 src/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 104ce999..4995211f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -344,7 +344,7 @@ target_link_libraries(${LUAJIT_BIN} ${LUAJIT_LIB} ${TARGET_LIBS})
 set(LUAJIT_BINARY $<TARGET_FILE:${LUAJIT_DEPS}> PARENT_SCOPE)
 
 add_custom_target(libluajit DEPENDS ${LIBLUAJIT_DEPS})
-add_custom_target(luajit ALL DEPENDS libluajit ${LUAJIT_DEPS})
+add_custom_target(luajit-main ALL DEPENDS libluajit ${LUAJIT_DEPS})
 
 # Unfortunately, CMake provides no guarantees for install commands
 # used for the targets excluded from <all> and obliges user to
-- 
2.25.1



More information about the Tarantool-patches mailing list