Skip to content

Commit

Permalink
Fix linker warnings about duplicate libs
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Sep 26, 2023
1 parent 6a01fc4 commit d668c88
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 55 deletions.
10 changes: 1 addition & 9 deletions nano/core_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,7 @@ target_compile_definitions(
core_test PRIVATE -DTAG_VERSION_STRING=${TAG_VERSION_STRING}
-DGIT_COMMIT_HASH=${GIT_COMMIT_HASH})

target_link_libraries(
core_test
node
secure
test_common
gtest
libminiupnpc-static
Boost::log_setup
Boost::log)
target_link_libraries(core_test test_common)

include_directories(${CMAKE_SOURCE_DIR}/submodules)
include_directories(${CMAKE_SOURCE_DIR}/submodules/cpptoml/include)
Expand Down
10 changes: 1 addition & 9 deletions nano/ipc_flatbuffers_test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
add_executable(ipc_flatbuffers_test_client entry.cpp)

target_link_libraries(
ipc_flatbuffers_test_client
nano_lib
Boost::filesystem
Boost::log_setup
Boost::log
Boost::program_options
Boost::system
Boost::thread)
target_link_libraries(ipc_flatbuffers_test_client node)
6 changes: 3 additions & 3 deletions nano/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ include_directories(

target_link_libraries(
nano_lib
ed25519
ipc_flatbuffers_lib
crypto_lib
ed25519
blake2
secure
ipc_flatbuffers_lib
${CRYPTOPP_LIBRARY}
${CMAKE_DL_LIBS}
Boost::iostreams
Boost::asio
Boost::circular_buffer
Boost::dll
Expand Down
2 changes: 1 addition & 1 deletion nano/load_test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
add_executable(load_test entry.cpp)

target_link_libraries(load_test boost_process node secure test_common gtest)
target_link_libraries(load_test test_common Boost::process)

include_directories(${CMAKE_SOURCE_DIR}/submodules)
include_directories(${CMAKE_SOURCE_DIR}/submodules/cpptoml/include)
Expand Down
10 changes: 2 additions & 8 deletions nano/nano_node/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
add_executable(nano_node daemon.cpp daemon.hpp entry.cpp)

target_link_libraries(
nano_node
Boost::process
node
rpc
secure
argon2
${PLATFORM_LIBS})
target_link_libraries(nano_node node Boost::process ${PLATFORM_LIBS})

include_directories(${CMAKE_SOURCE_DIR}/submodules)

target_compile_definitions(
Expand Down
12 changes: 1 addition & 11 deletions nano/nano_rpc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
add_executable(nano_rpc entry.cpp)

target_link_libraries(
nano_rpc
rpc
node
secure
Boost::filesystem
Boost::log_setup
Boost::log
Boost::program_options
Boost::system
Boost::thread)
target_link_libraries(nano_rpc node)

target_compile_definitions(
nano_rpc
Expand Down
4 changes: 2 additions & 2 deletions nano/node/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ endif()

target_link_libraries(
node
nano_lib
nano_store
rpc
secure
nano_lib
rpc
libminiupnpc-static
argon2
lmdb
Expand Down
2 changes: 1 addition & 1 deletion nano/rpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ add_library(
rpc_request_processor.hpp
rpc_request_processor.cpp)

target_link_libraries(rpc Boost::beast nano_lib ${OPENSSL_LIBRARIES})
target_link_libraries(rpc nano_lib Boost::beast ${OPENSSL_LIBRARIES})
2 changes: 1 addition & 1 deletion nano/rpc_test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
add_executable(rpc_test common.hpp common.cpp entry.cpp receivable.cpp rpc.cpp)

target_link_libraries(rpc_test node secure rpc test_common gtest)
target_link_libraries(rpc_test test_common)

target_compile_definitions(
rpc_test
Expand Down
10 changes: 2 additions & 8 deletions nano/secure/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,8 @@ add_library(
utility.cpp
working.hpp)

target_link_libraries(
secure
nano_lib
ed25519
crypto_lib
Boost::iostreams
Boost::system
Boost::filesystem)
target_link_libraries(secure nano_lib ed25519 crypto_lib Boost::system
Boost::filesystem)

target_compile_definitions(secure PUBLIC -DQT_NO_KEYWORDS
-DBOOST_ASIO_HAS_STD_ARRAY=1)
Expand Down
3 changes: 1 addition & 2 deletions nano/slow_test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
add_executable(slow_test entry.cpp node.cpp vote_cache.cpp vote_processor.cpp
bootstrap.cpp)

target_link_libraries(slow_test secure node test_common gtest
libminiupnpc-static)
target_link_libraries(slow_test test_common)

include_directories(${CMAKE_SOURCE_DIR}/submodules)

0 comments on commit d668c88

Please sign in to comment.