From e12879b5b75abc0e166d65bcb4695512ece1d002 Mon Sep 17 00:00:00 2001 From: penmetsaa Date: Wed, 20 Apr 2022 12:43:45 +0530 Subject: [PATCH] Removing duplicate / explicit linking of absl packages to lib binaries. (#2753) * removing duplicate target links * Adding dependencies at the right level --- cpp/CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 3899006a2a..57261a633e 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -477,8 +477,7 @@ endif () # Safeguarding against any potential link errors as mentioned in # https://github.com/abseil/abseil-cpp/issues/225 set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) -list (APPEND LIBRARY_DEPS absl::node_hash_set absl::strings) -list (APPEND COMMON_DEPS absl::synchronization) +list (APPEND LIBRARY_DEPS absl::node_hash_set absl::strings absl::synchronization) if (APPLE) list (APPEND COMMON_DEPS ${COREFOUNDATION_LIB} ${FOUNDATION_LIB}) @@ -570,7 +569,7 @@ if (NOT WIN32) list (APPEND TEST_LIBS pthread) endif () -target_link_libraries (libphonenumber_test ${TEST_LIBS} absl::node_hash_set) +target_link_libraries (libphonenumber_test ${TEST_LIBS}) # Unfortunately add_custom_target() can't accept a single command provided as a # list of commands. @@ -677,7 +676,7 @@ if (${BUILD_GEOCODER} STREQUAL "ON") geocoding_test_program "test/phonenumbers/geocoding/geocoding_test_program.cc" ) - target_link_libraries (geocoding_test_program geocoding phonenumber absl::node_hash_set) + target_link_libraries (geocoding_test_program geocoding phonenumber) endif () # Build an RPM