You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by br...@apache.org on 2025/04/06 23:53:24 UTC
(arrow) 04/04: GH-45987: [C++] Set CMAKE_POLICY_VERSION_MINIMUM=3.5 for bundled dependencies (#45997)
This is an automated email from the ASF dual-hosted git repository.
brycemecum pushed a commit to branch maint-19.0.1.1-r
in repository https://gitbox.apache.org/repos/asf/arrow.git
commit 709d70ff85ea7dc6047b7f1860738bf69b552f92
Author: Jacob Wujciak-Jens <ja...@wujciak.de>
AuthorDate: Tue Apr 1 14:45:01 2025 +0200
GH-45987: [C++] Set CMAKE_POLICY_VERSION_MINIMUM=3.5 for bundled dependencies (#45997)
### Rationale for this change
Enable building with CMake 4.0 and bundled dependencies that still set `cmake_minimum_required(VERSION 3.5)` or less.
### What changes are included in this PR?
Set https://cmake.org/cmake/help/latest/variable/CMAKE_POLICY_VERSION_MINIMUM.html
### Are these changes tested?
CI
### Are there any user-facing changes?
No
* GitHub Issue: #45987
Authored-by: Jacob Wujciak-Jens <ja...@wujciak.de>
Signed-off-by: Jacob Wujciak-Jens <ja...@wujciak.de>
---
cpp/cmake_modules/ThirdpartyToolchain.cmake | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index abfe6d274f..1d71283063 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -967,7 +967,8 @@ set(EP_COMMON_CMAKE_ARGS
-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=${CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY}
-DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}
- -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE})
+ -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE}
+ -DCMAKE_POLICY_VERSION_MINIMUM=3.5)
# if building with a toolchain file, pass that through
if(CMAKE_TOOLCHAIN_FILE)
@@ -1033,6 +1034,8 @@ macro(prepare_fetchcontent)
set(CMAKE_COMPILE_WARNING_AS_ERROR FALSE)
set(CMAKE_EXPORT_NO_PACKAGE_REGISTRY TRUE)
set(CMAKE_MACOSX_RPATH ${ARROW_INSTALL_NAME_RPATH})
+ set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
+
if(MSVC)
string(REPLACE "/WX" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
string(REPLACE "/WX" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")