From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (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 1AC884696C3 for ; Sun, 12 Apr 2020 03:13:34 +0300 (MSK) Received: by smtp50.i.mail.ru with esmtpa (envelope-from ) id 1jNQFi-0005lJ-FW for tarantool-patches@dev.tarantool.org; Sun, 12 Apr 2020 03:13:34 +0300 From: Vladislav Shpilevoy Date: Sun, 12 Apr 2020 02:12:49 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 01/43] cmake: remove double usage of some source files List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org src/cpu_feature.c, src/box/error.cc and src/box/vclock.c were used twice. As a result it could lead to duplicate symbols. --- src/CMakeLists.txt | 7 ++++--- src/box/CMakeLists.txt | 7 +++---- src/lib/small | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7d865472d..a17da9901 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -82,11 +82,13 @@ target_link_libraries(stat core) add_library(scramble STATIC scramble.c) target_link_libraries(scramble core misc) +add_library(cpu_feature STATIC cpu_feature.c) + add_library(crc32 STATIC crc32.c - cpu_feature.c ${PROJECT_SOURCE_DIR}/third_party/crc32.c ) +target_link_libraries(crc32 cpu_feature) set (server_sources find_path.c @@ -94,7 +96,6 @@ set (server_sources httpc.c pickle.c cfg.c - cpu_feature.c title.c proc_title.c path_lock.c @@ -170,7 +171,7 @@ set_source_files_compile_flags(${server_sources}) add_library(server STATIC ${server_sources}) add_dependencies(server build_bundled_libs) target_link_libraries(server core coll http_parser bit uri uuid swim swim_udp - swim_ev crypto) + swim_ev crypto crc32) # Rule of thumb: if exporting a symbol from a static library, list the # library here. diff --git a/src/box/CMakeLists.txt b/src/box/CMakeLists.txt index 56758bd2f..402860757 100644 --- a/src/box/CMakeLists.txt +++ b/src/box/CMakeLists.txt @@ -26,12 +26,12 @@ set_property(DIRECTORY PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${lua_sources}) include_directories(${ZSTD_INCLUDE_DIRS}) include_directories(${CMAKE_BINARY_DIR}/src/box/sql) -add_library(box_error STATIC error.cc errcode.c vclock.c) -target_link_libraries(box_error core stat) - add_library(vclock STATIC vclock.c) target_link_libraries(vclock core) +add_library(box_error STATIC error.cc errcode.c) +target_link_libraries(box_error core stat vclock) + add_library(xrow STATIC xrow.c iproto_constants.c) target_link_libraries(xrow server core small vclock misc box_error scramble ${MSGPUCK_LIBRARIES}) @@ -65,7 +65,6 @@ target_link_libraries(xlog core box_error crc32 ${ZSTD_LIBRARIES}) add_library(box STATIC iproto.cc - error.cc xrow_io.cc tuple_convert.c identifier.c diff --git a/src/lib/small b/src/lib/small index 3df505017..cebc40574 160000 --- a/src/lib/small +++ b/src/lib/small @@ -1 +1 @@ -Subproject commit 3df5050171d040bfe5717b4bddf57da3b312ffe4 +Subproject commit cebc40574cb68a21dac16c438371392db8f98f66 -- 2.21.1 (Apple Git-122.3)