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

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


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new e129ac389 ORC-1896: Add `CMAKE_POLICY_VERSION_MINIMUM=3.12` to 
`ThirdpartyToolchain.cmake`
e129ac389 is described below

commit e129ac3895e66ac9806c38a9d71a51df7eca4e07
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Wed May 7 15:08:31 2025 -0700

    ORC-1896: Add `CMAKE_POLICY_VERSION_MINIMUM=3.12` to 
`ThirdpartyToolchain.cmake`
    
    ### What changes were proposed in this pull request?
    
    This PR aims to add `CMAKE_POLICY_VERSION_MINIMUM=3.12` explicitly to 
`ThirdpartyToolchain.cmake` for Apache ORC 2.1.x.
    
    ### Why are the changes needed?
    
    The minimum requirement of CMake is `3.12.0` in Apache ORC 2.1.x.
    
    
https://github.com/apache/orc/blob/5affc04a590780deeec7c35c7258032c3883855c/CMakeLists.txt#L18
    
    ### How was this patch tested?
    
    Pass the CIs.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #2221 from dongjoon-hyun/ORC-1896.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 cmake_modules/ThirdpartyToolchain.cmake | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/cmake_modules/ThirdpartyToolchain.cmake 
b/cmake_modules/ThirdpartyToolchain.cmake
index ce1f6c4a9..a6be8db97 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -191,7 +191,7 @@ else ()
 
   ExternalProject_Add (snappy_ep
     URL "https://github.com/google/snappy/archive/${SNAPPY_VERSION}.tar.gz";
-    CMAKE_ARGS ${SNAPPY_CMAKE_ARGS} -DSNAPPY_BUILD_TESTS=OFF
+    CMAKE_ARGS ${SNAPPY_CMAKE_ARGS} -DSNAPPY_BUILD_TESTS=OFF 
-DCMAKE_POLICY_VERSION_MINIMUM=3.12
     ${THIRDPARTY_LOG_OPTIONS}
     BUILD_BYPRODUCTS "${SNAPPY_STATIC_LIB}")
 
@@ -250,7 +250,7 @@ else ()
 
   ExternalProject_Add (zlib_ep
     URL "https://zlib.net/fossils/zlib-${ZLIB_VERSION}.tar.gz";
-    CMAKE_ARGS ${ZLIB_CMAKE_ARGS}
+    CMAKE_ARGS ${ZLIB_CMAKE_ARGS} -DCMAKE_POLICY_VERSION_MINIMUM=3.12
     ${THIRDPARTY_LOG_OPTIONS}
     BUILD_BYPRODUCTS "${ZLIB_STATIC_LIB}")
 
@@ -305,6 +305,7 @@ else ()
   set(ZSTD_STATIC_LIB_NAME 
"${CMAKE_STATIC_LIBRARY_PREFIX}${ZSTD_STATIC_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}")
   set(ZSTD_STATIC_LIB "${ZSTD_HOME}/lib/${ZSTD_STATIC_LIB_NAME}")
   set(ZSTD_CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${ZSTD_HOME}
+          -DCMAKE_POLICY_VERSION_MINIMUM=3.12
           -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_LIBDIR=lib)
 
   if (BUILD_POSITION_INDEPENDENT_LIB)
@@ -461,7 +462,7 @@ if (BUILD_CPP_TESTS)
       BUILD_IN_SOURCE 1
       URL ${GTEST_SRC_URL}
       ${THIRDPARTY_LOG_OPTIONS}
-      CMAKE_ARGS ${GTEST_CMAKE_ARGS}
+      CMAKE_ARGS ${GTEST_CMAKE_ARGS} -DCMAKE_POLICY_VERSION_MINIMUM=3.12
       BUILD_BYPRODUCTS "${GMOCK_STATIC_LIB}" "${GTEST_STATIC_LIB}")
 
     set(GMOCK_LIBRARY ${GMOCK_STATIC_LIB})
@@ -535,6 +536,7 @@ else ()
   set(PROTOBUF_INCLUDE_DIR "${PROTOBUF_PREFIX}/include")
   set(PROTOBUF_CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PROTOBUF_PREFIX}
                           -DCMAKE_INSTALL_LIBDIR=lib
+                          -DCMAKE_POLICY_VERSION_MINIMUM=3.12
                           -DBUILD_SHARED_LIBS=OFF
                           -Dprotobuf_BUILD_TESTS=OFF)
 

Reply via email to