mirror of
https://github.com/grpc/grpc.git
synced 2026-01-24 10:53:30 +08:00
Since Cmake 3.15 there is no /MD flag in CMAKE_<LANG>_FLAGS(_<BUILD_TYPE>) variable like `CMAKE_CXX_FLAGS_DEBUG`. So we can't replace in with /MT. Use new cmake functionality with `CMAKE_MSVC_RUNTIME_LIBRARY`. The change is similar to similar to protobuf2d4414f384/CMakeLists.txt (L213)But grpc requires minimum cmake version 3.16 so we may simply replace old code with the new one Closes #38623 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38623 from RomantsovS:fix_msvc_static_runtime169b2f1ceePiperOrigin-RevId: 733475217