fish-shell/cmake/PCRE2.cmake
Peter Ammon 4e79ec5f0e
Some checks failed
make test / ubuntu (push) Waiting to run
make test / ubuntu-32bit-static-pcre2 (push) Waiting to run
make test / ubuntu-asan (push) Waiting to run
make test / macos (push) Waiting to run
Rust checks / rustfmt (push) Waiting to run
Rust checks / clippy (push) Waiting to run
Lock threads / lock (push) Has been cancelled
CMake: Restore static PCRE2 builds
The recent update to the rust-pcre2 crate lost the property where a static
PCRE2 build could be enabled with a Cargo feature. This means that static
PCRE2 builds can no longer be forced.

Switch to setting the "PCRE2_SYS_STATIC" variable again, which is how the
official rust-pcre2 crate expects to work.
2024-09-29 19:42:48 -07:00

11 lines
345 B
CMake

set(FISH_USE_SYSTEM_PCRE2 ON CACHE BOOL
"Try to use PCRE2 from the system, instead of the pcre2-sys version")
if(FISH_USE_SYSTEM_PCRE2)
message(STATUS "Trying to use PCRE2 from the system")
set(FISH_PCRE2_BUILDFLAG "")
else()
message(STATUS "Forcing static build of PCRE2")
set(ENV{PCRE2_SYS_STATIC} "1")
endif(FISH_USE_SYSTEM_PCRE2)