Check PCRE2 library JIT support during compilation or cmake configuration

54 Views Asked by At

The PCRE2 library provides feature support checks using only a pcre2_config() function which can be called at runtime like this:

int jit = 0;
pcre2_config_8(PCRE2_CONFIG_JIT, &jit);
if (!jit) ...

Is there a way for applications to detect missing PCRE2 JIT support at compile time or during cmake configuration, at least when linking the static library ?

When cross-compiling for arm64 on an amd64 host, running a test program from cmake probably requires qemu-user or another emulator which I'd like to avoid having as a build dependency.

0

There are 0 best solutions below