This is an automated email from the ASF dual-hosted git repository.
laiyingchun pushed a commit to branch dont_find_zpacks
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git
The following commit(s) were added to refs/heads/dont_find_zpacks by this push:
new 648caf4b2 snappy
648caf4b2 is described below
commit 648caf4b2ecc78a667643c2cfa91227e4d458f14
Author: Yingchun Lai <[email protected]>
AuthorDate: Mon Dec 4 23:48:55 2023 +0800
snappy
---
thirdparty/CMakeLists.txt | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt
index 416e627a0..d41da9e52 100644
--- a/thirdparty/CMakeLists.txt
+++ b/thirdparty/CMakeLists.txt
@@ -27,6 +27,10 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
endif ()
endif ()
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
+
find_package(OpenSSL REQUIRED)
include(ExternalProject)
@@ -361,6 +365,33 @@ ExternalProject_Add(jemalloc
DOWNLOAD_NO_PROGRESS true
)
+set(SNAPPY_OPTIONS
+ -DCMAKE_INSTALL_PREFIX=${TP_OUTPUT}
+ -DBUILD_SHARED_LIBS=OFF
+ -DSNAPPY_BUILD_TESTS=OFF
+ -DSNAPPY_BUILD_BENCHMARKS=OFF
+ -DSNAPPY_FUZZING_BUILD=OFF
+ -DSNAPPY_INSTALL=ON)
+execute_process(COMMAND arch OUTPUT_VARIABLE ARCH_NAME
OUTPUT_STRIP_TRAILING_WHITESPACE)
+message(STATUS "ARCH_NAME = ${ARCH_NAME}")
+if (ARCH_NAME EQUAL "x86_64")
+ set(SNAPPY_OPTIONS
+ ${SNAPPY_OPTIONS}
+ -DSNAPPY_REQUIRE_AVX=ON
+ -DSNAPPY_REQUIRE_AVX2=ON)
+endif ()
+ExternalProject_Add(snappy
+ URL ${OSS_URL_PREFIX}/snappy-1.1.10.tar.gz
+ https://github.com/google/snappy/archive/refs/tags/1.1.10.tar.gz
+ URL_MD5 70153395ebe6d72febe2cf2e40026a44
+ PATCH_COMMAND ""
+ CMAKE_ARGS ${SNAPPY_OPTIONS}
+ BUILD_COMMAND make -j${PARALLEL}
+ INSTALL_COMMAND make install
+ DOWNLOAD_EXTRACT_TIMESTAMP true
+ DOWNLOAD_NO_PROGRESS true
+)
+
option(ROCKSDB_PORTABLE "Minimum CPU arch to support, or 0 = current CPU, 1 =
baseline CPU" 0)
set(ROCKSDB_OPTIONS
-DFAIL_ON_WARNINGS=OFF
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]