From 5a34721b05156b2cb91efb3d83442544867bf1c9 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Mon, 22 Aug 2022 11:11:29 -0500 Subject: [PATCH] Use toolchain variables instead of cache_variables --- recipes/gtest/all/conanfile.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/gtest/all/conanfile.py b/recipes/gtest/all/conanfile.py index 922eaa70f7d5c..e1b6243c36926 100644 --- a/recipes/gtest/all/conanfile.py +++ b/recipes/gtest/all/conanfile.py @@ -129,9 +129,9 @@ def generate(self): tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" if self.settings.build_type == "Debug": - tc.cache_variables["CUSTOM_DEBUG_POSTFIX"] = str(self.options.debug_postfix) + tc.variables["CUSTOM_DEBUG_POSTFIX"] = str(self.options.debug_postfix) if is_msvc(self) or self._is_clang_cl: - tc.cache_variables["gtest_force_shared_crt"] = "MD" in msvc_runtime_flag(self) + tc.variables["gtest_force_shared_crt"] = "MD" in msvc_runtime_flag(self) try: check_min_vs(self, "191") @@ -139,10 +139,10 @@ def generate(self): tc.preprocessor_definitions["GTEST_LANG_CXX11"] = 1 tc.preprocessor_definitions["GTEST_HAS_TR1_TUPLE"] = 0 - tc.cache_variables["BUILD_GMOCK"] = bool(self.options.build_gmock) + tc.variables["BUILD_GMOCK"] = bool(self.options.build_gmock) if self.settings.os == "Windows" and self.settings.compiler == "gcc": - tc.cache_variables["gtest_disable_pthreads"] = True - tc.cache_variables["gtest_hide_internal_symbols"] = bool(self.options.hide_symbols) + tc.variables["gtest_disable_pthreads"] = True + tc.variables["gtest_hide_internal_symbols"] = bool(self.options.hide_symbols) tc.generate() def build(self):