Skip to content

Require CMake 4.0 - #22492

Merged
rapids-bot[bot] merged 10 commits into
NVIDIA:mainfrom
KyleFromNVIDIA:cmake-4.0
May 17, 2026
Merged

rapids-bot[bot] merged 10 commits into
NVIDIA:mainfrom
KyleFromNVIDIA:cmake-4.0

Conversation

@KyleFromNVIDIA

@KyleFromNVIDIA KyleFromNVIDIA commented May 13, 2026 •

Copy link
Copy Markdown
Member

@KyleFromNVIDIA
KyleFromNVIDIA requested review from a team as code owners May 13, 2026 15:52
@KyleFromNVIDIA
KyleFromNVIDIA requested a review from msarahan May 13, 2026 15:52
@github-actions github-actions Bot added libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API. CMake CMake build issue Java Affects Java cuDF API. pylibcudf Issues specific to the pylibcudf package labels May 13, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python May 13, 2026
@coderabbitai

coderabbitai Bot commented May 13, 2026 •

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This pull request systematically updates the minimum CMake version requirement from 3.30.4 to 4.0 across the entire RAPIDS cuDF repository. The change propagates through the build system entry point, dependency definitions, all C++ and Python projects, Java native builds, and conda package specifications, with SPDX copyright year ranges updated to 2026 where present.

Changes

CMake minimum version 4.0 requirement update

Layer / File(s) Summary
Central dependency anchor and CMake entry point
dependencies.yaml, cmake/RAPIDS.cmake
The shared YAML anchor &cmake_ver and main CMake entry point updated to enforce cmake>=4.0 minimum; SPDX copyright year extended to 2026.
C++ core and example projects CMakeLists
cpp/CMakeLists.txt, cpp/examples/*, cpp/libcudf_kafka/CMakeLists.txt
Main C++ project and all example subprojects CMakeLists updated to require CMake 4.0; copyright year ranges updated to 2026 in applicable files.
Java native CMake configuration
java/src/main/native/CMakeLists.txt
Java native build CMakeLists updated to enforce cmake_minimum_required VERSION 4.0.
Python project CMakeLists.txt files
python/cudf/CMakeLists.txt, python/cudf_kafka/CMakeLists.txt, python/cudf/udf_cpp/CMakeLists.txt, python/libcudf/CMakeLists.txt, python/pylibcudf/CMakeLists.txt
CMakeLists for Python packages updated to require CMake 4.0; SPDX copyright headers updated to 2026 where present.
Python project build backend requirements
python/cudf/pyproject.toml, python/cudf_kafka/pyproject.toml, python/libcudf/pyproject.toml, python/pylibcudf/pyproject.toml
Build tool requirements under [tool.rapids-build-backend].requires updated to specify cmake>=4.0.
Conda environment specifications
conda/environments/all_cuda-129_arch-aarch64.yaml, conda/environments/all_cuda-129_arch-x86_64.yaml, conda/environments/all_cuda-132_arch-aarch64.yaml, conda/environments/all_cuda-132_arch-x86_64.yaml
Generated conda environment files updated to specify cmake>=4.0 dependency constraint across all CUDA and architecture variants.
Conda recipe build configurations
conda/recipes/cudf/conda_build_config.yaml, conda/recipes/cudf_kafka/conda_build_config.yaml, conda/recipes/libcudf/conda_build_config.yaml, conda/recipes/pylibcudf/conda_build_config.yaml
Conda recipe build configs updated to require cmake_version>=4.0.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • msarahan
  • robertmaynard
  • bdice
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Require CMake 4.0' directly and clearly describes the main change across all modified files—updating CMake minimum version from 3.30.4 to 4.0.
Description check ✅ Passed The description references issue rapidsai/build-planning#277, which is directly related to the CMake 4.0 requirement change shown in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@mythrocks mythrocks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, barring resolution of conflicts.

@mythrocks mythrocks added non-breaking Non-breaking change improvement Improvement / enhancement to an existing function labels May 14, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
cpp/cmake/Modules/FindCUDAToolkit.cmake (1)

1028-1037: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Handle nvcc --version failures before relying on parsed output.

_nvcc_version_result is captured but never used. If nvcc --version exits non-zero, CUDAToolkit_VERSION can remain unset and version-gated targets are skipped silently.

Suggested fix
-    execute_process(COMMAND ${CUDAToolkit_NVCC_EXECUTABLE} "--version"
-      OUTPUT_VARIABLE NVCC_OUT
-      RESULT_VARIABLE _nvcc_version_result)
-    if(NVCC_OUT MATCHES [=[ V([0-9]+)\.([0-9]+)\.([0-9]+)]=])
+    execute_process(COMMAND ${CUDAToolkit_NVCC_EXECUTABLE} "--version"
+      OUTPUT_VARIABLE NVCC_OUT
+      ERROR_VARIABLE NVCC_ERR
+      RESULT_VARIABLE _nvcc_version_result)
+    if(_nvcc_version_result EQUAL 0 AND NVCC_OUT MATCHES [=[ V([0-9]+)\.([0-9]+)\.([0-9]+)]=])
       set(CUDAToolkit_VERSION_MAJOR "${CMAKE_MATCH_1}")
       set(CUDAToolkit_VERSION_MINOR "${CMAKE_MATCH_2}")
       set(CUDAToolkit_VERSION_PATCH "${CMAKE_MATCH_3}")
       set(CUDAToolkit_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}")
+    elseif(NOT _nvcc_version_result EQUAL 0)
+      _CUDAToolkit_find_version_file(version_file)
+      _CUDAToolkit_parse_version_file("${version_file}")
+      unset(version_file)
     endif()
     unset(NVCC_OUT)
+    unset(NVCC_ERR)
+    unset(_nvcc_version_result)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cpp/cmake/Modules/FindCUDAToolkit.cmake` around lines 1028 - 1037, The nvcc
version probe runs nvcc --version into NVCC_OUT but ignores the RESULT_VARIABLE
_nvcc_version_result, so when nvcc fails the matcher may be skipped silently;
update the probe around CUDAToolkit_NVCC_EXECUTABLE to first test that
_nvcc_version_result equals 0 (successful exit) before attempting the regex
match on NVCC_OUT, and if the result is non‑zero handle it by unsetting/clearing
CUDAToolkit_VERSION variables (CUDAToolkit_VERSION_MAJOR,
CUDAToolkit_VERSION_MINOR, CUDAToolkit_VERSION_PATCH, CUDAToolkit_VERSION) or
emit a diagnostic so version‑gated targets don’t silently proceed; ensure
NVCC_OUT is still unset at the end.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@cpp/cmake/Modules/FindCUDAToolkit.cmake`:
- Around line 1028-1037: The nvcc version probe runs nvcc --version into
NVCC_OUT but ignores the RESULT_VARIABLE _nvcc_version_result, so when nvcc
fails the matcher may be skipped silently; update the probe around
CUDAToolkit_NVCC_EXECUTABLE to first test that _nvcc_version_result equals 0
(successful exit) before attempting the regex match on NVCC_OUT, and if the
result is non‑zero handle it by unsetting/clearing CUDAToolkit_VERSION variables
(CUDAToolkit_VERSION_MAJOR, CUDAToolkit_VERSION_MINOR,
CUDAToolkit_VERSION_PATCH, CUDAToolkit_VERSION) or emit a diagnostic so
version‑gated targets don’t silently proceed; ensure NVCC_OUT is still unset at
the end.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e90c69c0-5966-4fde-9daa-694224e8f435

📥 Commits

Reviewing files that changed from the base of the PR and between e41d20e and a34f6e5.

📒 Files selected for processing (1)
  • cpp/cmake/Modules/FindCUDAToolkit.cmake

@mythrocks

Copy link
Copy Markdown
Contributor

This stands a chance of breaking the spark-rapids-jni build. We should be ready for it with this PR.

@KyleFromNVIDIA

Copy link
Copy Markdown
Member Author

We should be ready for it with NVIDIA/cudf-spark-jni#4557.

We should merge that before merging this, since we're trying to go top-to-bottom by dependency order.

@mythrocks

Copy link
Copy Markdown
Contributor

We should be ready for it with NVIDIA/spark-rapids-jni#4557.

We should merge that before merging this, since we're trying to go top-to-bottom by dependency order.

Working on it...

ttnghia pushed a commit to NVIDIA/cudf-spark-jni that referenced this pull request May 14, 2026
Fixes #4556.

This commit updates CMakeLists.txt to use CMake 4.0+, and updates the
Dockerfile used in the build.

This is in line with the changes in cuDF, in
NVIDIA/cudf#22492.

Signed-off-by: MithunR <[email protected]>
@pxLi

pxLi commented May 15, 2026

Copy link
Copy Markdown
Member

can we update also https://github.com/rapidsai/cudf/blob/main/java/ci/Dockerfile.rocky#L19?

@KyleFromNVIDIA

Copy link
Copy Markdown
Member Author

Done

@mythrocks

Copy link
Copy Markdown
Contributor

Ah, it appears that the spark-rapids-jni CI job does succeed, now that NVIDIA/cudf-spark-jni#4557 has been merged.

@igorpeshansky igorpeshansky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems fine, but I don't have enough context to know what else is missing…

@KyleFromNVIDIA

Copy link
Copy Markdown
Member Author

We're migrating from top to bottom by dependency order. There are several other repos that depend on cudf that have to be migrated before this one can be merged.

@KyleFromNVIDIA

Copy link
Copy Markdown
Member Author

/merge

@rapids-bot
rapids-bot Bot merged commit d1e6256 into NVIDIA:main May 17, 2026
292 of 304 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python May 17, 2026
@pxLi

pxLi commented May 18, 2026 •

Copy link
Copy Markdown
Member

@KyleFromNVIDIA will this change be backported into release/26.06?

Currently we have failures on both release/26.06 and main,

[2026-05-18T04:07:37.706Z]      [exec] CMake Error at /home/jenkins/agent/workspace/jenkins-cudf_nightly-pre_release-github-513-cuda12/java/target/cmake-build/src/rapidjson_ep-build/RapidJSONConfig.cmake:3 (cmake_minimum_required):

[2026-05-18T04:07:37.706Z]      [exec]   Compatibility with CMake < 3.5 has been removed from CMake.

filed #22540, also cc @mythrocks

NvTimLiu added a commit to NVIDIA/cudf-spark-examples that referenced this pull request May 20, 2026
To fix build cuDF cmake version error

```
[INFO]      [exec] CMake Error at /home/jenkins/agent/workspace/jenkins-examples-udf-examples-native-597/examples/UDF-Examples/RAPIDS-accelerated-UDFs/target/cpp-build/_deps/cudf-src/cpp/CMakeLists.txt:8 (cmake_minimum_required):
[INFO]      [exec]   CMake 4.0 or higher is required.  You are running version 3.30.4
```

Refer to NVIDIA/cudf-spark-jni#4557

This commit updates CMakeLists.txt to use CMake 4.0+, and updates the
Dockerfile used in the build.

This is in line with the changes in cuDF, in NVIDIA/cudf#22492.

Signed-off-by: Tim Liu <[email protected]>
karthikeyann pushed a commit to KyleFromNVIDIA/velox that referenced this pull request Jun 2, 2026
NVIDIA/cudf#22492 bumped cudf's required
CMake to 4.0. Bump CMake to 4.3.2 in the container scripts.
@coderabbitai coderabbitai Bot mentioned this pull request Jul 10, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake CMake build issue improvement Improvement / enhancement to an existing function Java Affects Java cuDF API. libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change pylibcudf Issues specific to the pylibcudf package Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants