From ae5dff0d7d2481277ea0f5e8f92eca4499db7dc4 Mon Sep 17 00:00:00 2001 From: Bryce Cahill Date: Mon, 11 Sep 2023 09:02:13 +1200 Subject: [PATCH] PCRE2: Explicitly specify cmake c standard * Fixes compilation issues with for loops --- recipes/pcre2/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/pcre2/all/conanfile.py b/recipes/pcre2/all/conanfile.py index 5982290e7cdbe1..c01d4a7565408d 100644 --- a/recipes/pcre2/all/conanfile.py +++ b/recipes/pcre2/all/conanfile.py @@ -98,6 +98,8 @@ def generate(self): tc.variables["PCRE2_BUILD_PCRE2_32"] = self.options.build_pcre2_32 tc.variables["PCRE2_SUPPORT_JIT"] = self.options.support_jit tc.variables["PCRE2GREP_SUPPORT_CALLOUT_FORK"] = self.options.get_safe("grep_support_callout_fork", False) + # Fix for error: 'for' loop initial declarations are only allowed in C99 or C11 mode + tc.variables["CMAKE_C_STANDARD"] = "99" if Version(self.version) < "10.38": # relocatable shared libs on Macos tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW"