-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b67811c
commit 9e989b9
Showing
1 changed file
with
12 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -37,7 +37,7 @@ NPROC=$(getconf _NPROCESSORS_ONLN) | |
COMPILER_FLAGS=$(get_cxx_flags $CPU_TARGET) | ||
|
||
DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)} | ||
MACOS_DEPS="ninja flex bison cmake ccache protobuf icu4c boost gflags glog libevent lz4 lzo snappy xz zstd [email protected]" | ||
MACOS_DEPS="ninja flex bison cmake ccache icu4c boost gflags glog libevent lz4 lzo snappy xz zstd [email protected]" | ||
|
||
function run_and_time { | ||
time "$@" | ||
|
@@ -109,6 +109,16 @@ function install_re2 { | |
cmake_install -DRE2_BUILD_TESTING=OFF | ||
} | ||
|
||
function install_protobuf { | ||
# Protobuf's optimized build and debug build are incompatible when linked with code from | ||
# another type of build, so we have to build and install both. | ||
github_checkout protocolbuffers/protobuf v3.21.2 | ||
# Install debug build. | ||
cmake_install -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_PROTOC_BINARIES=ON | ||
# Install optimized build. | ||
cmake_install -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_PROTOC_BINARIES=OFF | ||
} | ||
|
||
function install_velox_deps { | ||
if [ "${INSTALL_PREREQUISITES:-Y}" == "Y" ]; then | ||
run_and_time install_build_prerequisites | ||
|
@@ -118,6 +128,7 @@ function install_velox_deps { | |
run_and_time install_double_conversion | ||
run_and_time install_folly | ||
run_and_time install_re2 | ||
run_and_time install_protobuf | ||
} | ||
|
||
(return 2> /dev/null) && return # If script was sourced, don't run commands. | ||
|