Skip to content

Commit

Permalink
PCRE2: Explicitly specify cmake c standard
Browse files Browse the repository at this point in the history
* Fixes compilation issues with for loops
  • Loading branch information
brycec-invenco committed Sep 10, 2023
1 parent 9d1f315 commit ae5dff0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions recipes/pcre2/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ae5dff0

Please sign in to comment.