diff --git a/cmake/benchmark.cmake b/cmake/benchmark.cmake index 7bfc69f8181..93363100502 100644 --- a/cmake/benchmark.cmake +++ b/cmake/benchmark.cmake @@ -32,5 +32,6 @@ elseif(gRPC_BENCHMARK_PROVIDER STREQUAL "package") set(_gRPC_BENCHMARK_LIBRARIES benchmark::benchmark) endif() set(_gRPC_FIND_BENCHMARK "if(NOT benchmark_FOUND)\n find_package(benchmark CONFIG)\nendif()") +elseif(gRPC_BENCHMARK_PROVIDER STREQUAL "none") + # Benchmark is a test-only dependency and can be avoided if we're not building tests. endif() - diff --git a/cmake/gflags.cmake b/cmake/gflags.cmake index 820f84a1a20..f00c4666d2d 100644 --- a/cmake/gflags.cmake +++ b/cmake/gflags.cmake @@ -29,5 +29,6 @@ elseif(gRPC_GFLAGS_PROVIDER STREQUAL "package") set(_gRPC_GFLAGS_LIBRARIES gflags::gflags) endif() set(_gRPC_FIND_GFLAGS "if(NOT gflags_FOUND)\n find_package(gflags CONFIG)\nendif()") +elseif(gRPC_GFLAGS_PROVIDER STREQUAL "none") + # gflags is a test-only dependency and can be avoided if we're not building tests. endif() -