-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Petr Shumilov <[email protected]>
- Loading branch information
1 parent
82bf25e
commit 59d5755
Showing
21 changed files
with
98 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,7 +146,7 @@ jobs: | |
run: | | ||
brew tap shivammathur/php | ||
brew update | ||
brew install [email protected] re2c cmake coreutils libiconv re2 pcre yaml-cpp zstd googletest shivammathur/php/[email protected] | ||
brew install [email protected] re2c cmake coreutils libiconv re2 pcre yaml-cpp googletest shivammathur/php/[email protected] | ||
brew link --overwrite --force shivammathur/php/[email protected] | ||
/opt/homebrew/opt/[email protected]/libexec/bin/python -m pip install --upgrade pip --break-system-packages && /opt/homebrew/opt/[email protected]/libexec/bin/pip install --break-system-packages jsonschema | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ jobs: | |
run: | | ||
brew tap shivammathur/php | ||
brew update | ||
brew install [email protected] re2c cmake coreutils libiconv re2 pcre yaml-cpp zstd googletest shivammathur/php/[email protected] | ||
brew install [email protected] re2c cmake coreutils libiconv re2 pcre yaml-cpp googletest shivammathur/php/[email protected] | ||
brew link --overwrite --force shivammathur/php/[email protected] | ||
/opt/homebrew/opt/[email protected]/libexec/bin/python -m pip install --upgrade pip --break-system-packages && /opt/homebrew/opt/[email protected]/libexec/bin/pip install --break-system-packages jsonschema | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ Install packages | |
apt-get update | ||
apt install git cmake-data=3.16* cmake=3.16* make g++ gperf python3-minimal python3-jsonschema \ | ||
curl-kphp-vk libuber-h3-dev kphp-timelib libfmt-dev libgtest-dev libgmock-dev libre2-dev libpcre3-dev \ | ||
libzstd-dev libyaml-cpp-dev php7.4-dev libmysqlclient-dev libnuma-dev \ | ||
libyaml-cpp-dev php7.4-dev libmysqlclient-dev libnuma-dev \ | ||
postgresql postgresql-server-dev-all libpq-dev libldap-dev libkrb5-dev | ||
``` | ||
|
||
|
@@ -74,7 +74,7 @@ Install packages | |
apt-get update | ||
apt install git cmake make g++ gperf python3-minimal python3-jsonschema \ | ||
curl-kphp-vk libuber-h3-dev kphp-timelib libfmt-dev libgtest-dev libgmock-dev libre2-dev libpcre3-dev \ | ||
libzstd-dev libyaml-cpp-dev php7.4-dev libmysqlclient-dev libnuma-dev \ | ||
libyaml-cpp-dev php7.4-dev libmysqlclient-dev libnuma-dev \ | ||
postgresql postgresql-server-dev-all libpq-dev libldap-dev libkrb5-dev | ||
``` | ||
|
||
|
@@ -85,7 +85,7 @@ Make sure you have `brew` and `clang` (at least `Apple clang version 10.0.0`) | |
# Install dependencies | ||
brew tap shivammathur/php | ||
brew update | ||
brew install re2c cmake coreutils openssl libiconv re2 pcre yaml-cpp zstd googletest shivammathur/php/[email protected] | ||
brew install re2c cmake coreutils openssl libiconv re2 pcre yaml-cpp googletest shivammathur/php/[email protected] | ||
brew link --overwrite shivammathur/php/[email protected] | ||
pip3 install jsonschema | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
update_git_submodule(${THIRD_PARTY_DIR}/zstd) | ||
|
||
set(ZSTD_SOURCE_DIR ${THIRD_PARTY_DIR}/zstd) | ||
set(ZSTD_BUILD_DIR ${CMAKE_BINARY_DIR}/third-party/zstd/build) | ||
set(ZSTD_INSTALL_DIR ${CMAKE_BINARY_DIR}/third-party/zstd/install) | ||
set(ZSTD_BINARY_DIR ${ZSTD_BUILD_DIR}/lib) | ||
set(ZSTD_LIBRARIES ${ZSTD_INSTALL_DIR}/lib/libzstd.a) | ||
set(ZSTD_INCLUDE_DIRS ${ZSTD_INSTALL_DIR}/include) | ||
set(ZSTD_PATCH_DIR ${ZSTD_BUILD_DIR}/debian/patches/) | ||
set(ZSTD_PATCH_SERIES ${ZSTD_BUILD_DIR}/debian/patches/series) | ||
# Ensure the build, installation and "include" directories exists | ||
file(MAKE_DIRECTORY ${ZSTD_BUILD_DIR}) | ||
file(MAKE_DIRECTORY ${ZSTD_INSTALL_DIR}) | ||
file(MAKE_DIRECTORY ${ZSTD_INCLUDE_DIRS}) | ||
|
||
# The configuration has been based on: | ||
# https://sources.debian.org/src/libzstd/1.3.8%2Bdfsg-3%2Bdeb10u2/debian/rules/ | ||
set(ZSTD_COMPILE_FLAGS "$ENV{CFLAGS} -g0 -fno-pic") | ||
if(NOT APPLE) | ||
set(ZSTD_COMPILE_FLAGS "${ZSTD_COMPILE_FLAGS} -static") | ||
endif() | ||
|
||
set(ZSTD_MAKE_ARGS | ||
CC=${CMAKE_C_COMPILER} | ||
CFLAGS=${OPENSSL_COMPILE_FLAGS} | ||
) | ||
|
||
set(ZSTD_MAKE_INSTALL_ARGS | ||
PREFIX=${ZSTD_INSTALL_DIR} | ||
INCLUDEDIR=${ZSTD_INSTALL_DIR}/include/zstd | ||
) | ||
|
||
ExternalProject_Add( | ||
zstd | ||
PREFIX ${ZSTD_BUILD_DIR} | ||
SOURCE_DIR ${ZSTD_SOURCE_DIR} | ||
INSTALL_DIR ${ZSTD_INSTALL_DIR} | ||
BINARY_DIR ${ZSTD_BINARY_DIR} | ||
BUILD_BYPRODUCTS ${ZSTD_INSTALL_DIR}/lib/libzstd.a | ||
PATCH_COMMAND | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${ZSTD_SOURCE_DIR} ${ZSTD_BUILD_DIR} | ||
COMMAND ${CMAKE_COMMAND} -DBUILD_DIR=${ZSTD_BUILD_DIR} -DPATCH_SERIES=${ZSTD_PATCH_SERIES} -DPATCH_DIR=${ZSTD_PATCH_DIR} -P ../../cmake/apply_patches.cmake | ||
CONFIGURE_COMMAND | ||
COMMAND # Nothing to configure | ||
BUILD_COMMAND | ||
COMMAND ${CMAKE_COMMAND} -E env ${ZSTD_MAKE_ARGS} make libzstd.a -j | ||
INSTALL_COMMAND | ||
COMMAND ${CMAKE_COMMAND} -E env ${ZSTD_MAKE_INSTALL_ARGS} make install-static install-includes | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${ZSTD_INCLUDE_DIRS} ${INCLUDE_DIR} | ||
COMMAND ${CMAKE_COMMAND} -E copy ${ZSTD_LIBRARIES} ${LIB_DIR} | ||
BUILD_IN_SOURCE 0 | ||
) | ||
|
||
add_library(ZSTD::zstd STATIC IMPORTED) | ||
set_target_properties(ZSTD::zstd PROPERTIES | ||
IMPORTED_LOCATION ${ZSTD_LIBRARIES} | ||
INTERFACE_INCLUDE_DIRECTORIES ${ZSTD_INCLUDE_DIRS} | ||
) | ||
|
||
# Set variables indicating that zstd has been installed | ||
set(ZSTD_FOUND ON) | ||
|
||
cmake_print_variables(ZSTD_LIBRARIES) |