Skip to content

Commit

Permalink
Rename CMAKE_ARCH_DIR to ARROW_JAVA_JNI_ARCH_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
jduo committed Jan 15, 2024
1 parent d2ca049 commit 84c8278
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 23 deletions.
2 changes: 1 addition & 1 deletion ci/scripts/java_jni_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ cmake \
-DBUILD_TESTING=${ARROW_JAVA_BUILD_TESTS} \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DCMAKE_PREFIX_PATH=${arrow_install_dir} \
-DCMAKE_ARCH_DIR=${normalized_arch} \
-DARROW_JAVA_JNI_ARCH_DIR=${normalized_arch} \
-DCMAKE_INSTALL_PREFIX=${prefix_dir} \
-DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD:-OFF} \
-DProtobuf_USE_STATIC_LIBS=ON \
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/java_jni_macos_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ cmake \
-DARROW_S3=${ARROW_S3} \
-DARROW_USE_CCACHE=${ARROW_USE_CCACHE} \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DCMAKE_ARCH_DIR=${normalized_arch} \
-DARROW_JAVA_JNI_ARCH_DIR=${normalized_arch} \
-DCMAKE_INSTALL_PREFIX=${install_dir} \
-DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD} \
-DGTest_SOURCE=BUNDLED \
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/java_jni_manylinux_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ cmake \
-DARROW_S3=${ARROW_S3} \
-DARROW_USE_CCACHE=${ARROW_USE_CCACHE} \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DCMAKE_ARCH_DIR=${normalized_arch} \
-DARROW_JAVA_JNI_ARCH_DIR=${normalized_arch} \
-DCMAKE_INSTALL_PREFIX=${ARROW_HOME} \
-DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD} \
-DGTest_SOURCE=BUNDLED \
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/java_jni_windows_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ cmake \
-DARROW_WITH_SNAPPY=ON \
-DARROW_WITH_ZSTD=ON \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DCMAKE_ARCH_DIR=x86_64 \
-DARROW_JAVA_JNI_ARCH_DIR=x86_64 \
-DCMAKE_INSTALL_PREFIX=${install_dir} \
-DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD} \
-GNinja \
Expand Down
12 changes: 6 additions & 6 deletions docs/source/developers/java/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ CMake
-DARROW_JAVA_JNI_ENABLE_DEFAULT=OFF \
-DBUILD_TESTING=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_ARCH_DIR=<your system's architecture> \
-DARROW_JAVA_JNI_ARCH_DIR=<your system's architecture> \
-DCMAKE_INSTALL_PREFIX=java-dist
$ cmake --build java-cdata --target install --config Release
$ ls -latr java-dist/lib
Expand All @@ -184,7 +184,7 @@ CMake
-DARROW_JAVA_JNI_ENABLE_DEFAULT=OFF ^
-DBUILD_TESTING=OFF ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_ARCH_DIR=x86_64 ^
-DARROW_JAVA_JNI_ARCH_DIR=x86_64 ^
-DCMAKE_INSTALL_PREFIX=java-dist
$ cmake --build java-cdata --target install --config Release
$ dir "java-dist/bin"
Expand Down Expand Up @@ -220,7 +220,7 @@ CMake
-DARROW_SUBSTRAIT=ON \
-DARROW_USE_CCACHE=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_ARCH_DIR=<your system's architecture> \
-DARROW_JAVA_JNI_ARCH_DIR=<your system's architecture> \
-DCMAKE_INSTALL_PREFIX=java-dist \
-DCMAKE_UNITY_BUILD=ON
$ cmake --build cpp-jni --target install --config Release
Expand All @@ -231,7 +231,7 @@ CMake
-DARROW_JAVA_JNI_ENABLE_DEFAULT=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_ARCH_DIR=<your system's architecture> \
-DARROW_JAVA_JNI_ARCH_DIR=<your system's architecture> \
-DCMAKE_INSTALL_PREFIX=java-dist \
-DCMAKE_PREFIX_PATH=$PWD/java-dist \
-DProtobuf_ROOT=$PWD/../cpp-jni/protobuf_ep-install \
Expand Down Expand Up @@ -269,7 +269,7 @@ CMake
-DARROW_WITH_ZLIB=ON ^
-DARROW_WITH_ZSTD=ON ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_ARCH_DIR=x86_64 ^
-DARROW_JAVA_JNI_ARCH_DIR=x86_64 ^
-DCMAKE_INSTALL_PREFIX=java-dist ^
-DCMAKE_UNITY_BUILD=ON ^
-GNinja
Expand All @@ -286,7 +286,7 @@ CMake
-DARROW_JAVA_JNI_ENABLE_ORC=ON ^
-DBUILD_TESTING=OFF ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_ARCH_DIR=x86_64 ^
-DARROW_JAVA_JNI_ARCH_DIR=x86_64 ^
-DCMAKE_INSTALL_PREFIX=java-dist ^
-DCMAKE_PREFIX_PATH=$PWD/java-dist
$ cmake --build java-jni --target install --config Release
Expand Down
6 changes: 4 additions & 2 deletions java/adapter/orc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ set_property(TARGET arrow_java_jni_orc PROPERTY OUTPUT_NAME "arrow_orc_jni")
target_link_libraries(arrow_java_jni_orc arrow_java_jni_orc_headers jni
Arrow::arrow_static)

set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib/arrow_orc_jni/${CMAKE_ARCH_DIR}")
set(CMAKE_INSTALL_BINDIR "${CMAKE_INSTALL_PREFIX}/bin/arrow_orc_jni/${CMAKE_ARCH_DIR}")
set(CMAKE_INSTALL_LIBDIR
"${CMAKE_INSTALL_PREFIX}/lib/arrow_orc_jni/${ARROW_JAVA_JNI_ARCH_DIR}")
set(CMAKE_INSTALL_BINDIR
"${CMAKE_INSTALL_PREFIX}/bin/arrow_orc_jni/${ARROW_JAVA_JNI_ARCH_DIR}")

install(TARGETS arrow_java_jni_orc
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down
6 changes: 4 additions & 2 deletions java/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ add_library(arrow_java_jni_cdata SHARED src/main/cpp/jni_wrapper.cc)
set_property(TARGET arrow_java_jni_cdata PROPERTY OUTPUT_NAME "arrow_cdata_jni")
target_link_libraries(arrow_java_jni_cdata arrow_java_jni_cdata_headers jni)

set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib/arrow_cdata_jni/${CMAKE_ARCH_DIR}")
set(CMAKE_INSTALL_BINDIR "${CMAKE_INSTALL_PREFIX}/bin/arrow_cdata_jni/${CMAKE_ARCH_DIR}")
set(CMAKE_INSTALL_LIBDIR
"${CMAKE_INSTALL_PREFIX}/lib/arrow_cdata_jni/${ARROW_JAVA_JNI_ARCH_DIR}")
set(CMAKE_INSTALL_BINDIR
"${CMAKE_INSTALL_PREFIX}/bin/arrow_cdata_jni/${ARROW_JAVA_JNI_ARCH_DIR}")

install(TARGETS arrow_java_jni_cdata
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down
4 changes: 2 additions & 2 deletions java/dataset/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ if(BUILD_TESTING)
endif()

set(CMAKE_INSTALL_LIBDIR
"${CMAKE_INSTALL_PREFIX}/lib/arrow_dataset_jni/${CMAKE_ARCH_DIR}")
"${CMAKE_INSTALL_PREFIX}/lib/arrow_dataset_jni/${ARROW_JAVA_JNI_ARCH_DIR}")

set(CMAKE_INSTALL_BINDIR
"${CMAKE_INSTALL_PREFIX}/bin/arrow_dataset_jni/${CMAKE_ARCH_DIR}")
"${CMAKE_INSTALL_PREFIX}/bin/arrow_dataset_jni/${ARROW_JAVA_JNI_ARCH_DIR}")

install(TARGETS arrow_java_jni_dataset
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down
6 changes: 4 additions & 2 deletions java/gandiva/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ if(CXX_LINKER_SUPPORTS_VERSION_SCRIPT)
)
endif()

set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib/gandiva_jni/${CMAKE_ARCH_DIR}")
set(CMAKE_INSTALL_BINDIR "${CMAKE_INSTALL_PREFIX}/bin/gandiva_jni/${CMAKE_ARCH_DIR}")
set(CMAKE_INSTALL_LIBDIR
"${CMAKE_INSTALL_PREFIX}/lib/gandiva_jni/${ARROW_JAVA_JNI_ARCH_DIR}")
set(CMAKE_INSTALL_BINDIR
"${CMAKE_INSTALL_PREFIX}/bin/gandiva_jni/${ARROW_JAVA_JNI_ARCH_DIR}")

install(TARGETS arrow_java_jni_gandiva
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down
10 changes: 5 additions & 5 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@
-DARROW_JAVA_JNI_ENABLE_DEFAULT=OFF
-DBUILD_TESTING=OFF
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_ARCH_DIR=${os.detected.arch}
-DARROW_JAVA_JNI_ARCH_DIR=${os.detected.arch}
-DCMAKE_INSTALL_PREFIX=${arrow.c.jni.dist.dir}
</commandlineArgs>
<workingDirectory>../</workingDirectory>
Expand Down Expand Up @@ -1128,7 +1128,7 @@
-DARROW_SUBSTRAIT=${ARROW_DATASET}
-DARROW_USE_CCACHE=ON
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_ARCH_DIR=${os.detected.arch}
-DARROW_JAVA_JNI_ARCH_DIR=${os.detected.arch}
-DCMAKE_INSTALL_PREFIX=java-dist
-DCMAKE_UNITY_BUILD=ON
</commandlineArgs>
Expand Down Expand Up @@ -1169,7 +1169,7 @@
-DARROW_JAVA_JNI_ENABLE_DEFAULT=ON
-DBUILD_TESTING=OFF
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_ARCH_DIR=${os.detected.arch}
-DARROW_JAVA_JNI_ARCH_DIR=${os.detected.arch}
-DCMAKE_INSTALL_PREFIX=${arrow.dataset.jni.dist.dir}
-DCMAKE_PREFIX_PATH=${project.basedir}/../java-dist/lib/${os.detected.arch}/cmake
-DProtobuf_USE_STATIC_LIBS=ON
Expand Down Expand Up @@ -1248,7 +1248,7 @@
-DARROW_WITH_ZLIB=ON
-DARROW_WITH_ZSTD=ON
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_ARCH_DIR=${os.detected.arch}
-DARROW_JAVA_JNI_ARCH_DIR=${os.detected.arch}
-DCMAKE_INSTALL_PREFIX=java-dist
-DCMAKE_UNITY_BUILD=ON
-GNinja
Expand Down Expand Up @@ -1290,7 +1290,7 @@
-DARROW_JAVA_JNI_ENABLE_DEFAULT=ON
-DBUILD_TESTING=OFF
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_ARCH_DIR=${os.detected.arch}
-DARROW_JAVA_JNI_ARCH_DIR=${os.detected.arch}
-DCMAKE_INSTALL_PREFIX=${arrow.dataset.jni.dist.dir}
-DCMAKE_PREFIX_PATH=${project.basedir}/../java-dist/lib/${os.detected.arch}/cmake
</commandlineArgs>
Expand Down

0 comments on commit 84c8278

Please sign in to comment.