fix(build): fix wasmtime version regex (#41438)

Problem: Regex assumes a single-digit patch number, but LTS wasmtime releases (which we track) can run into double digits.

Solution: Allow for multi-digit patch numbers.
This commit is contained in:
Eamon Burns
2026-08-23 00:55:09 -07:00
committed by GitHub
parent 63f70d97a6
commit 1deeff9c38

View File

@@ -3,7 +3,7 @@ find_library2(WASMTIME_LIBRARY wasmtime)
if(WASMTIME_INCLUDE_DIR AND EXISTS "${WASMTIME_INCLUDE_DIR}/wasmtime.h")
file(STRINGS ${WASMTIME_INCLUDE_DIR}/wasmtime.h WASMTIME_VERSION REGEX "#define WASMTIME_VERSION")
string(REGEX MATCH "[0-9]+\.[0-9]\.[0-9]" WASMTIME_VERSION ${WASMTIME_VERSION})
string(REGEX MATCH "[0-9]+\.[0-9]+\.[0-9]+" WASMTIME_VERSION ${WASMTIME_VERSION})
endif()
find_package_handle_standard_args(Wasmtime