Skip to content

Commit

Permalink
[thirdyparty] new thirdy party dragonbox (apache#24979)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqiang-hhhh authored Sep 28, 2023
1 parent bf808e9 commit 11d03a3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
16 changes: 16 additions & 0 deletions thirdparty/build-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1701,6 +1701,21 @@ build_hadoop_libs() {
find ./hadoop-dist/target/hadoop-3.3.4/lib/native/ -type l -exec cp -P {} "${TP_INSTALL_DIR}/lib/hadoop_hdfs/native/" \;
}

# dragonbox
build_dragonbox() {
check_if_source_exist "${DRAGONBOX_SOURCE}"
cd "${TP_SOURCE_DIR}/${DRAGONBOX_SOURCE}"

rm -rf "${BUILD_DIR}"
mkdir -p "${BUILD_DIR}"
cd "${BUILD_DIR}"

"${CMAKE_CMD}" -G "${GENERATOR}" -DCMAKE_INSTALL_PREFIX="${TP_INSTALL_DIR}" -DDRAGONBOX_INSTALL_TO_CHARS=ON ..

"${BUILD_SYSTEM}" -j "${PARALLEL}"
"${BUILD_SYSTEM}" install
}

if [[ "${#packages[@]}" -eq 0 ]]; then
packages=(
libunixodbc
Expand Down Expand Up @@ -1763,6 +1778,7 @@ if [[ "${#packages[@]}" -eq 0 ]]; then
concurrentqueue
fast_float
libunwind
dragonbox
)
if [[ "$(uname -s)" == 'Darwin' ]]; then
read -r -a packages <<<"binutils gettext ${packages[*]}"
Expand Down
7 changes: 7 additions & 0 deletions thirdparty/vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,12 @@ HADOOP_LIBS_NAME="hadoop-3.3.4.5-for-doris.tar.gz"
HADOOP_LIBS_SOURCE="doris-thirdparty-hadoop-3.3.4.5-for-doris"
HADOOP_LIBS_MD5SUM="15b7be1747b27c37923b0cb9db6cff8c"

# libdragonbox for faster double/float to string
DRAGONBOX_DOWNLOAD="https://github.com/jk-jeon/dragonbox/archive/refs/tags/1.1.3.tar.gz"
DRAGONBOX_NAME=dragonbox-1.1.3.tar.gz
DRAGONBOX_SOURCE=dragonbox-1.1.3
DRAGONBOX_MD5SUM="889dc00db9612c6949a4ccf8115e0e6a"

# all thirdparties which need to be downloaded is set in array TP_ARCHIVES
export TP_ARCHIVES=(
'LIBEVENT'
Expand Down Expand Up @@ -548,6 +554,7 @@ export TP_ARCHIVES=(
'CONCURRENTQUEUE'
'FAST_FLOAT'
'HADOOP_LIBS'
'DRAGONBOX'
)

if [[ "$(uname -s)" == 'Darwin' ]]; then
Expand Down

0 comments on commit 11d03a3

Please sign in to comment.