From 84c827873ea05c67d026aaccce6c707b41317de1 Mon Sep 17 00:00:00 2001 From: James Duong Date: Mon, 15 Jan 2024 08:34:19 -0800 Subject: [PATCH] Rename CMAKE_ARCH_DIR to ARROW_JAVA_JNI_ARCH_DIR --- ci/scripts/java_jni_build.sh | 2 +- ci/scripts/java_jni_macos_build.sh | 2 +- ci/scripts/java_jni_manylinux_build.sh | 2 +- ci/scripts/java_jni_windows_build.sh | 2 +- docs/source/developers/java/building.rst | 12 ++++++------ java/adapter/orc/CMakeLists.txt | 6 ++++-- java/c/CMakeLists.txt | 6 ++++-- java/dataset/CMakeLists.txt | 4 ++-- java/gandiva/CMakeLists.txt | 6 ++++-- java/pom.xml | 10 +++++----- 10 files changed, 29 insertions(+), 23 deletions(-) diff --git a/ci/scripts/java_jni_build.sh b/ci/scripts/java_jni_build.sh index 6534ea74b0cde..9c3f031b61d06 100755 --- a/ci/scripts/java_jni_build.sh +++ b/ci/scripts/java_jni_build.sh @@ -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 \ diff --git a/ci/scripts/java_jni_macos_build.sh b/ci/scripts/java_jni_macos_build.sh index 6e52389007f28..5d9c3ce15d9bc 100755 --- a/ci/scripts/java_jni_macos_build.sh +++ b/ci/scripts/java_jni_macos_build.sh @@ -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 \ diff --git a/ci/scripts/java_jni_manylinux_build.sh b/ci/scripts/java_jni_manylinux_build.sh index 709a64c42fd64..572cc79a23207 100755 --- a/ci/scripts/java_jni_manylinux_build.sh +++ b/ci/scripts/java_jni_manylinux_build.sh @@ -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 \ diff --git a/ci/scripts/java_jni_windows_build.sh b/ci/scripts/java_jni_windows_build.sh index 6aa057d2aaa92..b0916a9eb8be4 100755 --- a/ci/scripts/java_jni_windows_build.sh +++ b/ci/scripts/java_jni_windows_build.sh @@ -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 \ diff --git a/docs/source/developers/java/building.rst b/docs/source/developers/java/building.rst index 5e7e327ae2844..6e17b948834b9 100644 --- a/docs/source/developers/java/building.rst +++ b/docs/source/developers/java/building.rst @@ -165,7 +165,7 @@ CMake -DARROW_JAVA_JNI_ENABLE_DEFAULT=OFF \ -DBUILD_TESTING=OFF \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_ARCH_DIR= \ + -DARROW_JAVA_JNI_ARCH_DIR= \ -DCMAKE_INSTALL_PREFIX=java-dist $ cmake --build java-cdata --target install --config Release $ ls -latr java-dist/lib @@ -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" @@ -220,7 +220,7 @@ CMake -DARROW_SUBSTRAIT=ON \ -DARROW_USE_CCACHE=ON \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_ARCH_DIR= \ + -DARROW_JAVA_JNI_ARCH_DIR= \ -DCMAKE_INSTALL_PREFIX=java-dist \ -DCMAKE_UNITY_BUILD=ON $ cmake --build cpp-jni --target install --config Release @@ -231,7 +231,7 @@ CMake -DARROW_JAVA_JNI_ENABLE_DEFAULT=ON \ -DBUILD_TESTING=OFF \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_ARCH_DIR= \ + -DARROW_JAVA_JNI_ARCH_DIR= \ -DCMAKE_INSTALL_PREFIX=java-dist \ -DCMAKE_PREFIX_PATH=$PWD/java-dist \ -DProtobuf_ROOT=$PWD/../cpp-jni/protobuf_ep-install \ @@ -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 @@ -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 diff --git a/java/adapter/orc/CMakeLists.txt b/java/adapter/orc/CMakeLists.txt index 71fd6461d8cc6..92545941f0e89 100644 --- a/java/adapter/orc/CMakeLists.txt +++ b/java/adapter/orc/CMakeLists.txt @@ -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} diff --git a/java/c/CMakeLists.txt b/java/c/CMakeLists.txt index 83591ea505353..b8f87ef545fd1 100644 --- a/java/c/CMakeLists.txt +++ b/java/c/CMakeLists.txt @@ -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} diff --git a/java/dataset/CMakeLists.txt b/java/dataset/CMakeLists.txt index 07e0d0c2a0eda..9ca5f4d75c0d3 100644 --- a/java/dataset/CMakeLists.txt +++ b/java/dataset/CMakeLists.txt @@ -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} diff --git a/java/gandiva/CMakeLists.txt b/java/gandiva/CMakeLists.txt index 3da4ae8290451..097eedffc47f7 100644 --- a/java/gandiva/CMakeLists.txt +++ b/java/gandiva/CMakeLists.txt @@ -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} diff --git a/java/pom.xml b/java/pom.xml index 03c0a21fb7b7f..908c114e8cbef 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -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} ../ @@ -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 @@ -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 @@ -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 @@ -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