Skip to content

[Core] Bump minimum required cmake to 3.22 - #41997

Closed
yuanweiz wants to merge 18 commits into
grpc:masterfrom
yuanweiz:cmake-3.25
Closed

yuanweiz wants to merge 18 commits into
grpc:masterfrom
yuanweiz:cmake-3.25

Conversation

@yuanweiz

@yuanweiz yuanweiz commented Apr 2, 2026 •

Copy link
Copy Markdown
Contributor

Follow up of #42795. The previous change only updated Dockerfiles based on debian:11, but missed these base images:

  • silkeh/clang:14-bullseye
  • gcc:10
  • python:3.10-bullseye

Cmake variable _gRPC_INSTALL_SUPPORTED_FROM_MODULE is always TRUE for version >=3.13 so we can remove it safely.

Also update CMakeLists.txt to enforces use of cmake 3.22 or higher per OSS policy. This should reduce the chance of missing updates in our dockerfiles.

@yuanweiz yuanweiz changed the title cmake 3.25 from bullseye-backports [Build] Upgrade cmake from 3.18 to 3.25 Apr 2, 2026
@yuanweiz yuanweiz changed the title [Build] Upgrade cmake from 3.18 to 3.25 [Build] Upgrade cmake from 3.18 to 3.25 for debian 11 images. Apr 2, 2026
@yuanweiz yuanweiz changed the title [Build] Upgrade cmake from 3.18 to 3.25 for debian 11 images. [Build] Upgrade cmake from 3.18 to 3.25 for debian 11 based docker images. Apr 2, 2026
@yuanweiz yuanweiz self-assigned this Apr 2, 2026
@yuanweiz yuanweiz added the release notes: no Indicates if PR should not be in release notes label Apr 2, 2026
@yuanweiz

yuanweiz commented Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

related: #41986

@yuanweiz yuanweiz changed the title [Build] Upgrade cmake from 3.18 to 3.25 for debian 11 based docker images. [Core] Bump mininum required cmake to 3.22 Jul 24, 2026
@yuanweiz

yuanweiz commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the minimum required CMake version to 3.22 and configures several Dockerfiles to install CMake from Debian 11 (bullseye) backports. The review feedback points out that the CMake version bump makes legacy version checks obsolete, allowing for code simplification. Additionally, the reviewer notes that using archive.debian.org for active Debian 11 backports is incorrect and recommends using deb.debian.org instead, along with adding apt-get clean to optimize Docker image sizes.

Comment thread templates/CMakeLists.txt.template Resolved
@yuanweiz
yuanweiz marked this pull request as ready for review August 10, 2026 17:04
@yuanweiz
yuanweiz requested a review from sergiitk as a code owner August 10, 2026 17:04
@sergiitk sergiitk changed the title [Core] Bump mininum required cmake to 3.22 [Core] Bump minimum required cmake to 3.22 Aug 10, 2026

@sergiitk sergiitk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  1. The C# Debian 11 base images still pull CMake 3.18 and need migration to bullseye-backports to avoid build breakages.
  2. The C++ examples still declare cmake_minimum_required(VERSION 3.16), which creates a fatal configuration trap during sub-project builds.
  3. The cmake_from_install_script.include file and its associated cxx_clang_7_x64 template are orphaned dead code and can be safely deleted.

Comment thread CMakeLists.txt Resolved
Comment thread CMakeLists.txt Resolved
Comment thread CMakeLists.txt Resolved
Comment thread cmake/cares.cmake Resolved
asheshvidyut pushed a commit to PeterZhizhin/grpc that referenced this pull request Nov 12, 2026
Follow up of grpc#42795. The previous change only updated `Dockerfile`s based on `debian:11`, but missed these base images:

* silkeh/clang:14-bullseye
* gcc:10
* python:3.10-bullseye

Cmake variable `_gRPC_INSTALL_SUPPORTED_FROM_MODULE` is always TRUE for version >=3.13 so we can remove it safely.

Also update CMakeLists.txt to enforces use of cmake 3.22 or higher per OSS [policy](https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md#compilers-tools-build-systems). This should reduce the chance of missing updates in our dockerfiles.

Closes grpc#41997

COPYBARA_INTEGRATE_REVIEW=grpc#41997 from yuanweiz:cmake-3.25 3992786
PiperOrigin-RevId: 964156025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants