GH-48801: [C++] Set CMAKE_POLICY_VERSION_MINIMUM for RapidJSON#49993
Open
KyleFromNVIDIA wants to merge 1 commit into
Open
GH-48801: [C++] Set CMAKE_POLICY_VERSION_MINIMUM for RapidJSON#49993KyleFromNVIDIA wants to merge 1 commit into
KyleFromNVIDIA wants to merge 1 commit into
Conversation
We already set this variable when adding projects through `ExternalProject_Add()`, but the config file that RapidJSON exports sets `cmake_minimum_required()` to a version older than 3.5. Set the policy minimum when searching for the just-built RapidJSON.
|
|
|
|
|
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses CMake 4.x configuration failures caused by RapidJSON’s exported RapidJSONConfig.cmake using an old cmake_minimum_required() version by temporarily setting CMAKE_POLICY_VERSION_MINIMUM when FindRapidJSONAlt.cmake calls find_package(RapidJSON).
Changes:
- Temporarily sets
CMAKE_POLICY_VERSION_MINIMUMto3.5aroundfind_package(RapidJSON ...)in the RapidJSON “Alt” find module. - Restores
CMAKE_POLICY_VERSION_MINIMUMafterward.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+29
to
+32
| set(_CMAKE_POLICY_VERSION_MINIMUM_OLD ${CMAKE_POLICY_VERSION_MINIMUM}) | ||
| set(CMAKE_POLICY_VERSION_MINIMUM 3.5) | ||
| find_package(RapidJSON ${find_package_args}) | ||
| set(CMAKE_POLICY_VERSION_MINIMUM ${_CMAKE_POLICY_VERSION_MINIMUM_OLD}) |
Member
|
Error message: rapidsai/cudf#22540 |
Member
|
GH-48801 is for bundled RapidJSON but this is for system RapidJSON. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
We already set this variable when adding projects through
ExternalProject_Add(), but the config file that RapidJSON exports setscmake_minimum_required()to a version older than 3.5. Set the policy minimum when searching for the just-built RapidJSON.What changes are included in this PR?
Set
CMAKE_POLICY_VERSION_MINIMUMinFindRapidJSONAlt.cmakeAre these changes tested?
Tested locally
Are there any user-facing changes?