Skip to content

Commit

Permalink
[infra] Update Abseil-cpp (Samsung#9490)
Browse files Browse the repository at this point in the history
This commit update Abseil-cpp version to 20211102.
This abseil-cpp branch is used on TensorFlow 2.9 ~ main branch.

Signed-off-by: Hyeongseok Oh <[email protected]>
  • Loading branch information
hseok-oh authored Jul 25, 2022
1 parent 5e58444 commit 2dadb67
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
12 changes: 6 additions & 6 deletions infra/cmake/packages/AbseilConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ function(_Abseil_import)

# NOTE Turn off abseil testing
set(BUILD_TESTING OFF)
# Set -fPIC property because Abseil-cpp can be used for shared library
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Abseil-cpp 20211102.0 show warning without below setting
set(ABSL_PROPAGATE_CXX_STD ON)

add_extdirectory("${AbseilSource_DIR}" ABSEIL)

add_library(abseil INTERFACE)

target_link_libraries(abseil INTERFACE
# From "Available Abseil CMake Public Targets" in CMake/README.md
absl::algorithm
Expand All @@ -27,7 +33,6 @@ function(_Abseil_import)
absl::numeric
absl::random_random
absl::strings
absl::status
absl::synchronization
absl::time
absl::utility
Expand All @@ -37,9 +42,4 @@ function(_Abseil_import)
set(Abseil_FOUND TRUE PARENT_SCOPE)
endfunction(_Abseil_import)

set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fPIC")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fPIC")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fPIC")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC")

_Abseil_import()
7 changes: 3 additions & 4 deletions infra/cmake/packages/AbseilSourceConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ function(_AbseilSource_import)
nnas_include(ExternalSourceTools)
nnas_include(OptionTools)

# NOTE TensorFlow 2.3 downloads abseil from the following URL
# NOTE TensorFlow 2.9 downloads abseil 20211102.0
envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
envoption(ABSEIL_URL ${EXTERNAL_DOWNLOAD_SERVER}/abseil/abseil-cpp/archive/df3ea785d8c30a9503321a3d35ee7d35808f190d.tar.gz)

envoption(ABSEIL_URL ${EXTERNAL_DOWNLOAD_SERVER}/abseil/abseil-cpp/archive/20211102.0.tar.gz)
ExternalSource_Download(ABSEIL
DIRNAME ABSEIL
URL ${ABSEIL_URL}
CHECKSUM MD5=4d9aa7e757adf48fef171c85f0d88552)
CHECKSUM MD5=bdca561519192543378b7cade101ec43)

set(AbseilSource_DIR ${ABSEIL_SOURCE_DIR} PARENT_SCOPE)
set(AbseilSource_FOUND TRUE PARENT_SCOPE)
Expand Down
Binary file modified packaging/ABSEIL.tar.gz
Binary file not shown.

0 comments on commit 2dadb67

Please sign in to comment.