[Build] Bumped the minimum version of cmake (#37702)

Per https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md, the minimum version of cmake to support is 3.16 so let's change our cmake builds' requirements accordingly.

Closes #37702

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37702 from veblush:cmake316 bb4ed1a1be5e9374980c922aac3dc1ccd27d1266
PiperOrigin-RevId: 680639191
pull/37687/head
Esun Kim 2 months ago committed by Copybara-Service
parent ff0c2e326f
commit a49d450a54
  1. 2
      CMakeLists.txt
  2. 2
      examples/android/helloworld/app/CMakeLists.txt
  3. 2
      examples/cpp/auth/CMakeLists.txt
  4. 2
      examples/cpp/cancellation/CMakeLists.txt
  5. 2
      examples/cpp/cmake/common.cmake
  6. 2
      examples/cpp/compression/CMakeLists.txt
  7. 2
      examples/cpp/deadline/CMakeLists.txt
  8. 2
      examples/cpp/error_details/CMakeLists.txt
  9. 2
      examples/cpp/error_handling/CMakeLists.txt
  10. 2
      examples/cpp/flow_control/CMakeLists.txt
  11. 2
      examples/cpp/generic_api/CMakeLists.txt
  12. 2
      examples/cpp/health/CMakeLists.txt
  13. 2
      examples/cpp/helloworld/CMakeLists.txt
  14. 2
      examples/cpp/helloworld/cmake_externalproject/CMakeLists.txt
  15. 2
      examples/cpp/interceptors/CMakeLists.txt
  16. 2
      examples/cpp/keepalive/CMakeLists.txt
  17. 2
      examples/cpp/load_balancing/CMakeLists.txt
  18. 2
      examples/cpp/metadata/CMakeLists.txt
  19. 2
      examples/cpp/multiplex/CMakeLists.txt
  20. 2
      examples/cpp/otel/CMakeLists.txt
  21. 2
      examples/cpp/otel/codelab/CMakeLists.txt
  22. 2
      examples/cpp/otel/ostream/CMakeLists.txt
  23. 2
      examples/cpp/retry/CMakeLists.txt
  24. 2
      examples/cpp/route_guide/CMakeLists.txt
  25. 2
      examples/cpp/wait_for_ready/CMakeLists.txt
  26. 2
      src/android/test/interop/app/CMakeLists.txt
  27. 2
      src/cpp/README.md
  28. 2
      templates/CMakeLists.txt.template

2
CMakeLists.txt generated

@ -22,7 +22,7 @@
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.16)
set(PACKAGE_NAME "grpc") set(PACKAGE_NAME "grpc")
set(PACKAGE_VERSION "1.68.0-dev") set(PACKAGE_VERSION "1.68.0-dev")

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
set(helloworld_PROTOBUF_PROTOC_EXECUTABLE "/usr/local/bin/protoc" CACHE STRING "Protoc binary on host") set(helloworld_PROTOBUF_PROTOC_EXECUTABLE "/usr/local/bin/protoc" CACHE STRING "Protoc binary on host")
set(helloworld_GRPC_CPP_PLUGIN_EXECUTABLE "/usr/local/bin/grpc_cpp_plugin" CACHE STRING "gRPC CPP plugin binary on host") set(helloworld_GRPC_CPP_PLUGIN_EXECUTABLE "/usr/local/bin/grpc_cpp_plugin" CACHE STRING "gRPC CPP plugin binary on host")

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building keyvaluestore. # that automatically builds all the dependencies before building keyvaluestore.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(Cancellation C CXX) project(Cancellation C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building keyvaluestore. # that automatically builds all the dependencies before building keyvaluestore.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(Cancellation C CXX) project(Cancellation C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building route_guide. # that automatically builds all the dependencies before building route_guide.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
if(MSVC) if(MSVC)
add_definitions(-D_WIN32_WINNT=0x600) add_definitions(-D_WIN32_WINNT=0x600)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building helloworld. # that automatically builds all the dependencies before building helloworld.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(Compression C CXX) project(Compression C CXX)

@ -16,7 +16,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building this example. # that automatically builds all the dependencies before building this example.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(Deadline C CXX) project(Deadline C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building helloworld. # that automatically builds all the dependencies before building helloworld.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(ErrorDetails C CXX) project(ErrorDetails C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building helloworld. # that automatically builds all the dependencies before building helloworld.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(ErrorHandling C CXX) project(ErrorHandling C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building example. # that automatically builds all the dependencies before building example.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(HelloWorld C CXX) project(HelloWorld C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building helloworld. # that automatically builds all the dependencies before building helloworld.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(GenericAPI C CXX) project(GenericAPI C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building helloworld. # that automatically builds all the dependencies before building helloworld.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(HelloWorld C CXX) project(HelloWorld C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building helloworld. # that automatically builds all the dependencies before building helloworld.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(HelloWorld C CXX) project(HelloWorld C CXX)

@ -20,7 +20,7 @@
# including the "helloworld" project itself. # including the "helloworld" project itself.
# See https://blog.kitware.com/cmake-superbuilds-git-submodules/ # See https://blog.kitware.com/cmake-superbuilds-git-submodules/
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
# Project # Project
project(HelloWorld-SuperBuild C CXX) project(HelloWorld-SuperBuild C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building keyvaluestore. # that automatically builds all the dependencies before building keyvaluestore.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(KeyValueStore C CXX) project(KeyValueStore C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building helloworld. # that automatically builds all the dependencies before building helloworld.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(HelloWorld C CXX) project(HelloWorld C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building helloworld. # that automatically builds all the dependencies before building helloworld.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(LoadBalancing C CXX) project(LoadBalancing C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building helloworld. # that automatically builds all the dependencies before building helloworld.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(Metadata C CXX) project(Metadata C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building helloworld. # that automatically builds all the dependencies before building helloworld.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(Multiplex C CXX) project(Multiplex C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building helloworld. # that automatically builds all the dependencies before building helloworld.
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.16)
project(grpc_opentelemetry_example C CXX) project(grpc_opentelemetry_example C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building helloworld. # that automatically builds all the dependencies before building helloworld.
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.16)
project(grpc_opentelemetry_example C CXX) project(grpc_opentelemetry_example C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building helloworld. # that automatically builds all the dependencies before building helloworld.
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.16)
project(grpc_opentelemetry_example C CXX) project(grpc_opentelemetry_example C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building retry. # that automatically builds all the dependencies before building retry.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(Retry C CXX) project(Retry C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building route_guide. # that automatically builds all the dependencies before building route_guide.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(RouteGuide C CXX) project(RouteGuide C CXX)

@ -17,7 +17,7 @@
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build # See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
# that automatically builds all the dependencies before building helloworld. # that automatically builds all the dependencies before building helloworld.
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
project(HelloWorld C CXX) project(HelloWorld C CXX)

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.8) cmake_minimum_required(VERSION 3.16)
set(PROTOBUF_PROTOC_EXECUTABLE "/usr/local/bin/protoc" CACHE STRING "Protoc binary on host") set(PROTOBUF_PROTOC_EXECUTABLE "/usr/local/bin/protoc" CACHE STRING "Protoc binary on host")
set(gRPC_CPP_PLUGIN_EXECUTABLE "/usr/local/bin/grpc_cpp_plugin" CACHE STRING "gRPC CPP plugin binary on host") set(gRPC_CPP_PLUGIN_EXECUTABLE "/usr/local/bin/grpc_cpp_plugin" CACHE STRING "gRPC CPP plugin binary on host")

@ -107,7 +107,7 @@ also sets up an `add_subdirectory()` rule for you. This causes gRPC to be
built as part of your project. built as part of your project.
```cmake ```cmake
cmake_minimum_required(VERSION 3.15) cmake_minimum_required(VERSION 3.16)
project(my_project) project(my_project)
include(FetchContent) include(FetchContent)

@ -275,7 +275,7 @@
protobuf_gen_files.add(src) protobuf_gen_files.add(src)
%> %>
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.16)
set(PACKAGE_NAME "grpc") set(PACKAGE_NAME "grpc")
set(PACKAGE_VERSION "${settings.cpp_version}") set(PACKAGE_VERSION "${settings.cpp_version}")

Loading…
Cancel
Save