Skip to content

Commit 9991893

Browse files
committed
different approach
1 parent fe81a62 commit 9991893

4 files changed

Lines changed: 15 additions & 20 deletions

File tree

.github/workflows/rc.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,11 @@ jobs:
174174
- name: Extract source archive
175175
run: |
176176
tar -xf apache-arrow-java-*.tar.gz --strip-components=1
177-
- name: Download the latest Apache Arrow C++
178-
if: github.event_name != 'schedule'
179-
run: |
180-
ci/scripts/download_cpp.sh
181177
- name: Checkout Apache Arrow C++
182-
if: github.event_name == 'schedule'
183178
uses: actions/checkout@v7
184179
with:
185180
repository: apache/arrow
181+
ref: main
186182
path: arrow
187183
- name: Checkout apache/arrow-testing
188184
uses: actions/checkout@v7

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ option(ARROW_JAVA_JNI_ENABLE_C "Enable C data interface" ${ARROW_JAVA_JNI_ENABLE
3737
option(ARROW_JAVA_JNI_ENABLE_DATASET "Enable dataset" ${ARROW_JAVA_JNI_ENABLE_DEFAULT})
3838
option(ARROW_JAVA_JNI_ENABLE_GANDIVA "Enable Gandiva" ${ARROW_JAVA_JNI_ENABLE_DEFAULT})
3939
option(ARROW_JAVA_JNI_ENABLE_ORC "Enable ORC" ${ARROW_JAVA_JNI_ENABLE_DEFAULT})
40+
set(ARROW_JAVA_JNI_ABSL_INCLUDE_DIR
41+
""
42+
CACHE PATH "Path to Abseil source headers for the Gandiva JNI build")
43+
mark_as_advanced(ARROW_JAVA_JNI_ABSL_INCLUDE_DIR)
4044

4145
include(GNUInstallDirs)
4246

ci/scripts/jni_macos_build.sh

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -73,29 +73,20 @@ cmake \
7373
-S "${arrow_dir}/cpp" \
7474
-B "${build_dir}/cpp" \
7575
--preset=ninja-release-jni-macos \
76+
-Dabsl_SOURCE=BUNDLED \
7677
-DCMAKE_INSTALL_PREFIX="${install_dir}"
7778
cmake --build "${build_dir}/cpp" --target install
7879
github_actions_group_end
7980

80-
absl_build_dir="${build_dir}/cpp/_deps/absl-build"
81-
absl_cmake_dir=""
82-
if [ -d "${absl_build_dir}" ]; then
83-
github_actions_group_begin "Installing bundled Abseil"
84-
cmake --build "${build_dir}/cpp" --target _deps/absl-build/all --config Release
85-
cmake --install "${absl_build_dir}" --prefix "${install_dir}" --config Release
86-
absl_cmake_dir="${install_dir}/lib/cmake/absl"
87-
if [ ! -f "${absl_cmake_dir}/abslConfig.cmake" ]; then
88-
echo "Bundled Abseil CMake package was not installed in ${absl_cmake_dir}" >&2
89-
exit 1
90-
fi
91-
github_actions_group_end
81+
absl_include_dir="${build_dir}/cpp/_deps/absl-src"
82+
if [ ! -d "${absl_include_dir}/absl" ]; then
83+
echo "Bundled Abseil headers were not found in ${absl_include_dir}" >&2
84+
exit 1
9285
fi
9386

9487
JAVA_JNI_CMAKE_ARGS="-DProtobuf_ROOT=${build_dir}/cpp/_deps/protobuf-build"
9588
JAVA_JNI_CMAKE_ARGS+=" -DProtobuf_SRC_ROOT_FOLDER=${build_dir}/cpp/_deps/protobuf-src"
96-
if [ -n "${absl_cmake_dir}" ]; then
97-
JAVA_JNI_CMAKE_ARGS+=" -Dabsl_DIR=${absl_cmake_dir}"
98-
fi
89+
JAVA_JNI_CMAKE_ARGS+=" -DARROW_JAVA_JNI_ABSL_INCLUDE_DIR=${absl_include_dir}"
9990
export JAVA_JNI_CMAKE_ARGS
10091
"${source_dir}/ci/scripts/jni_build.sh" \
10192
"${source_dir}" \

gandiva/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ add_library(arrow_java_jni_gandiva SHARED
5454
src/main/cpp/jni_common.cc
5555
${GANDIVA_PROTO_OUTPUT_FILES})
5656
set_property(TARGET arrow_java_jni_gandiva PROPERTY OUTPUT_NAME "gandiva_jni")
57+
if(ARROW_JAVA_JNI_ABSL_INCLUDE_DIR)
58+
target_include_directories(arrow_java_jni_gandiva SYSTEM
59+
PRIVATE "${ARROW_JAVA_JNI_ABSL_INCLUDE_DIR}")
60+
endif()
5761
target_link_libraries(arrow_java_jni_gandiva
5862
arrow_java_jni_gandiva_headers
5963
jni

0 commit comments

Comments
 (0)