You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by do...@apache.org on 2025/03/16 23:12:26 UTC

(orc) branch branch-2.0 updated: ORC-1810: [C++] Add environment variable ORC_FORMAT_URL

This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new a31c5d6ed ORC-1810: [C++] Add environment variable ORC_FORMAT_URL
a31c5d6ed is described below

commit a31c5d6ed6f32ca4c05d21206a184a838b430318
Author: luffy-zh <zh...@outlook.com>
AuthorDate: Fri Jan 3 08:42:46 2025 -0800

    ORC-1810: [C++] Add environment variable ORC_FORMAT_URL
    
    ### What changes were proposed in this pull request?
    
    Add an CMake option ORC_FORMAT_URL to indicate where to download the orc-format_ep
    
    ### Why are the changes needed?
    
    Handle the issue discussed https://github.com/apache/arrow/pull/43417
    
    ### How was this patch tested?
    
    Test it locally
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    NO
    
    Closes #2094 from luffy-zh/ORC-1810.
    
    Authored-by: luffy-zh <zh...@outlook.com>
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
 cmake_modules/ThirdpartyToolchain.cmake | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
index 40fb6adce..5f2438909 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -71,8 +71,15 @@ endif ()
 
 # ----------------------------------------------------------------------
 # ORC Format
+if(DEFINED ENV{ORC_FORMAT_URL})
+  set(ORC_FORMAT_SOURCE_URL "$ENV{ORC_FORMAT_URL}")
+  message(STATUS "Using ORC_FORMAT_URL: ${ORC_FORMAT_SOURCE_URL}")
+else()
+  set(ORC_FORMAT_SOURCE_URL "https://www.apache.org/dyn/closer.lua/orc/orc-format-${ORC_FORMAT_VERSION}/orc-format-${ORC_FORMAT_VERSION}.tar.gz?action=download" )
+  message(STATUS "Using DEFAULT URL: ${ORC_FORMAT_SOURCE_URL}")
+endif()
 ExternalProject_Add (orc-format_ep
-  URL "https://www.apache.org/dyn/closer.lua/orc/orc-format-${ORC_FORMAT_VERSION}/orc-format-${ORC_FORMAT_VERSION}.tar.gz?action=download"
+  URL ${ORC_FORMAT_SOURCE_URL}
   URL_HASH SHA256=739fae5ff94b1f812b413077280361045bf92e510ef04b34a610e23a945d8cd5
   CONFIGURE_COMMAND ""
   BUILD_COMMAND     ""