Skip to content

fix(cmake): patch Arrow for CMAKE_POLICY_VERSION_MINIMUM#184

Merged
lxy-9602 merged 2 commits intoalibaba:mainfrom
mrdrivingduck:feat_cmake_minimum
Mar 18, 2026
Merged

fix(cmake): patch Arrow for CMAKE_POLICY_VERSION_MINIMUM#184
lxy-9602 merged 2 commits intoalibaba:mainfrom
mrdrivingduck:feat_cmake_minimum

Conversation

@mrdrivingduck
Copy link
Contributor

The existing EP_COMMON_CMAKE_ARGS fix (#175) covers direct dependencies, but Arrow internally builds its own sub-dependencies (e.g., brotli) via ExternalProject_Add. These sub-dependencies specify cmake_minimum_required(VERSION 2.8), which causes a fatal error on CMake >= 3.30.

Patch Arrow's ThirdpartyToolchain.cmake to append -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to EP_COMMON_CMAKE_ARGS when CMake >= 3.30, ensuring all bundled sub-dependencies are configured successfully.

The existing EP_COMMON_CMAKE_ARGS fix (alibaba#175) covers direct dependencies,
but Arrow internally builds its own sub-dependencies (e.g., brotli)
via ExternalProject_Add. These sub-dependencies specify
cmake_minimum_required(VERSION 2.8), which causes a fatal error on
CMake >= 3.30.

Patch Arrow's ThirdpartyToolchain.cmake to append
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 to EP_COMMON_CMAKE_ARGS when
CMake >= 3.30, ensuring all bundled sub-dependencies are configured
successfully.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 18, 2026 05:49
@mrdrivingduck
Copy link
Contributor Author

It is tested on CMake 4.2.3.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the local Arrow patch set to ensure Arrow’s own ExternalProject_Add sub-dependencies (e.g., brotli) configure successfully under CMake 3.30+, by propagating CMAKE_POLICY_VERSION_MINIMUM into Arrow’s internal EP_COMMON_CMAKE_ARGS.

Changes:

  • Patch Arrow’s cpp/cmake_modules/ThirdpartyToolchain.cmake to append -DCMAKE_POLICY_VERSION_MINIMUM=3.5 when CMAKE_VERSION >= 3.30.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Collaborator

@zjw1111 zjw1111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@lxy-9602 lxy-9602 merged commit 5a16a0f into alibaba:main Mar 18, 2026
8 checks passed
@mrdrivingduck mrdrivingduck deleted the feat_cmake_minimum branch March 18, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants