Skip to content

Commit 5830778

Browse files
committed
Set grpc_MSVC_STATIC_RUNTIME option in grpc
1 parent e9533c6 commit 5830778

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

recipes/grpc/all/conanfile.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ def generate(self):
201201
# (supported in gRPC >= 1.62.0)
202202
tc.cache_variables["gRPC_DOWNLOAD_ARCHIVES"] = False
203203

204-
205204
# Consumed targets (abseil) via interface target_compiler_feature can propagate newer standards
206205
if not valid_min_cppstd(self, self._cxxstd_required):
207206
tc.cache_variables["CMAKE_CXX_STANDARD"] = self._cxxstd_required
@@ -210,6 +209,11 @@ def generate(self):
210209
# workaround for: install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable
211210
tc.cache_variables["CMAKE_MACOSX_BUNDLE"] = False
212211

212+
if is_msvc(self) or self._is_clang_cl:
213+
runtime = self.settings.get_safe("compiler.runtime")
214+
if runtime:
215+
tc.cache_variables["grpc_MSVC_STATIC_RUNTIME"] = runtime == "static"
216+
213217
if self._supports_libsystemd:
214218
tc.cache_variables["gRPC_USE_SYSTEMD"] = self.options.with_libsystemd
215219

0 commit comments

Comments
 (0)