Skip to content

Commit

Permalink
Set build arg for install script
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE committed Jun 28, 2024
1 parent e459655 commit 9d6654b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
10 changes: 5 additions & 5 deletions cpp/CMake/ConfigArrow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ set(ARROW_LIB_NAME "arrow")
set(PARQUET_LIB_NAME "parquet")
set(ARROW_BUNDLED_DEPS "arrow_bundled_dependencies")

set(ARROW_INSTALL_DIR "${ARROW_HOME}/install")
set(ARROW_LIB_DIR "${ARROW_INSTALL_DIR}/lib")
set(ARROW_LIB64_DIR "${ARROW_INSTALL_DIR}/lib64")
set(ARROW_INCLUDE_DIR "${ARROW_INSTALL_DIR}/include")

function(FIND_ARROW_LIB LIB_NAME)
if(NOT TARGET Arrow::${LIB_NAME})
set(ARROW_LIB_FULL_NAME
Expand Down Expand Up @@ -48,8 +53,3 @@ function(FIND_ARROW_LIB LIB_NAME)
endif()
endif()
endfunction()

set(ARROW_INSTALL_DIR "${ARROW_HOME}/install")
set(ARROW_LIB_DIR "${ARROW_INSTALL_DIR}/lib")
set(ARROW_LIB64_DIR "${ARROW_INSTALL_DIR}/lib64")
set(ARROW_INCLUDE_DIR "${ARROW_INSTALL_DIR}/include")
11 changes: 4 additions & 7 deletions dev/build_arrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ CURRENT_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
source ${CURRENT_DIR}/build_helper_functions.sh
VELOX_ARROW_BUILD_VERSION=15.0.0
ARROW_PREFIX=$CURRENT_DIR/arrow_ep
# Always uses BUNDLED in case of that thrift is not installed.
THRIFT_SOURCE="BUNDLED"
BUILD_TYPE=Release

function prepare_arrow_build() {
Expand All @@ -38,15 +36,14 @@ function install_arrow_deps {
}

function build_arrow_cpp() {
if [ -n "$1" ]; then
BUILD_TYPE=$1
fi
pushd $ARROW_PREFIX/cpp

cmake_install \
-DARROW_PARQUET=ON \
-DARROW_FILESYSTEM=ON \
-DARROW_PROTOBUF_USE_SHARED=OFF \
-DARROW_DEPENDENCY_USE_SHARED=OFF \
-DARROW_DEPENDENCY_SOURCE=BUNDLED \
-DARROW_WITH_THRIFT=ON \
-DARROW_WITH_LZ4=ON \
-DARROW_WITH_SNAPPY=ON \
Expand All @@ -59,8 +56,8 @@ function build_arrow_cpp() {
-DARROW_TESTING=ON \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DARROW_BUILD_STATIC=ON \
-DThrift_SOURCE=${THRIFT_SOURCE}
-DARROW_BUILD_SHARED=OFF \
-DARROW_BUILD_STATIC=ON
popd
}

Expand Down
5 changes: 2 additions & 3 deletions dev/builddeps-veloxbe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ function build_arrow {
cd $GLUTEN_DIR/dev
source build_arrow.sh
prepare_arrow_build
build_arrow_cpp $BUILD_TYPE
build_arrow_cpp
echo "Finished building arrow CPP"
build_arrow_java
echo "Finished building arrow Java"
Expand All @@ -208,9 +208,8 @@ function build_velox {
--num_threads=$NUM_THREADS
}

## compile gluten cpp
function build_gluten_cpp {
echo "Start to Gluten CPP"
echo "Start to build Gluten CPP"
cd $GLUTEN_DIR/cpp
rm -rf build
mkdir build
Expand Down

0 comments on commit 9d6654b

Please sign in to comment.