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

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


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

commit bba33c99b0c6566c616967653ab9a28e04266e4c
Author: luffy-zh <[email protected]>
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 <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 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 18ac671a2..d08a37df6 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -136,8 +136,15 @@ endfunction()
 
 # ----------------------------------------------------------------------
 # 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     ""

Reply via email to