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 594184acc ORC-1894: Add `CMAKE_POLICY_VERSION_MINIMUM=3.12` to
`PROTOBUF_CMAKE_ARGS`
594184acc is described below
commit 594184acc1b1e0016992d8ad8386ba4d4901b15e
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Wed May 7 13:16:42 2025 -0700
ORC-1894: Add `CMAKE_POLICY_VERSION_MINIMUM=3.12` to `PROTOBUF_CMAKE_ARGS`
### What changes were proposed in this pull request?
This PR aims to add `CMAKE_POLICY_VERSION_MINIMUM=3.12` to
`PROTOBUF_CMAKE_ARGS` explicitly.
### Why are the changes needed?
The minimum requirement of Apache ORC is `CMake 3.12`.
https://github.com/apache/orc/blob/463137faedea7f9138d20451d554707dcaf29850/CMakeLists.txt#L18
To support `CMake 4`, we need to make it sure Apache ORC's minimum
requirement. Otherwise, `Protobuf` fails to build.
- https://github.com/Kitware/CMake/releases/tag/v4.0.0 (2025-03-27)
- https://github.com/Kitware/CMake/releases/tag/v4.0.1 (2025-04-10)
- https://github.com/Kitware/CMake/releases/tag/v4.0.2 (2025-05-07)
### How was this patch tested?
Pass the CIs and do the manual test with `cmake 4 or higher`.
```
$ cmake --version
cmake version 4.0.1
```
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #2217 from dongjoon-hyun/ORC-1894.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
cmake_modules/ThirdpartyToolchain.cmake | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmake_modules/ThirdpartyToolchain.cmake
b/cmake_modules/ThirdpartyToolchain.cmake
index 5d5bec4ca..1cb568701 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -535,6 +535,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)