Skip to content

Commit

Permalink
Removing duplicate / explicit linking of absl packages to lib binarie…
Browse files Browse the repository at this point in the history
…s. (google#2753)

* removing duplicate target links

* Adding dependencies at the right level
  • Loading branch information
penmetsaa authored Apr 20, 2022
1 parent 083d7cb commit e12879b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e12879b

Please sign in to comment.