Skip to content

Commit 0c0e130

Browse files
koufacebook-github-bot
authored andcommitted
Fix Abseil CMake package name (#152)
Summary: It's "absl" not "abseil". If we use "abseil", -Dabseil_SOURCE=SYSTEM is never succeeded because abseilConfig.cmake doesn't exist. This also sets some ABSL_* variables like Velox does in https://github.com/facebookincubator/velox/blob/main/CMake/resolve_dependency_modules/absl.cmake . Pull Request resolved: #152 Reviewed By: Yuhta Differential Revision: D77894756 Pulled By: kevinwilfong fbshipit-source-id: a886cce6f4954c3dab86e80c2c7cf6e0a999dae5
1 parent 30cbc74 commit 0c0e130

File tree

3 files changed

+27
-24
lines changed

3 files changed

+27
-24
lines changed

CMake/abseil.cmake

Lines changed: 0 additions & 22 deletions
This file was deleted.

CMake/absl.cmake

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
include_guard(GLOBAL)
2+
3+
# TODO: these variables are named VELOX_* because we are piggy-backing on
4+
# Velox's resolve dependency module for now. We should change and have our own
5+
# in the future.
6+
set(VELOX_ABSL_VERSION 20240116.0)
7+
set(VELOX_ABSL_BUILD_SHA256_CHECKSUM
8+
"338420448b140f0dfd1a1ea3c3ce71b3bc172071f24f4d9a57d59b45037da440")
9+
set(VELOX_ABSL_SOURCE_URL
10+
"https://github.com/abseil/abseil-cpp/archive/refs/tags/${VELOX_ABSL_VERSION}.tar.gz"
11+
)
12+
13+
velox_resolve_dependency_url(ABSL)
14+
15+
message(STATUS "Building Abseil from source")
16+
17+
FetchContent_Declare(
18+
absl
19+
URL ${VELOX_ABSL_SOURCE_URL}
20+
URL_HASH ${VELOX_ABSL_BUILD_SHA256_CHECKSUM})
21+
22+
set(ABSL_BUILD_TESTING OFF)
23+
set(ABSL_PROPAGATE_CXX_STD ON)
24+
set(ABSL_ENABLE_INSTALL ON)
25+
FetchContent_MakeAvailable(absl)

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ velox_resolve_dependency(Boost 1.77.0 COMPONENTS ${BOOST_INCLUDE_LIBRARIES})
115115
velox_set_source(folly)
116116
velox_resolve_dependency(folly)
117117

118-
velox_set_source(abseil)
119-
velox_resolve_dependency(abseil)
118+
velox_set_source(absl)
119+
velox_resolve_dependency(absl)
120120

121121
# Use xxhash and xsimd from Velox for now.
122122
include_directories(.)

0 commit comments

Comments
 (0)