FindFLEX: fix version extraction on Apple
The space in 'flex 2.5.35 Apple(flex-31)' caused the version extraction to fail. Ignore everything after the first space following the version number.
This commit is contained in:
parent
3e72df1484
commit
af06482d24
|
@ -94,7 +94,7 @@ if(FLEX_EXECUTABLE)
|
|||
# older versions of flex printed "/full/path/to/executable version X.Y"
|
||||
# newer versions use "basename(executable) X.Y"
|
||||
get_filename_component(FLEX_EXE_NAME "${FLEX_EXECUTABLE}" NAME)
|
||||
string(REGEX REPLACE "^.*${FLEX_EXE_NAME}\"? (version )?([0-9]+[^ ]*)$" "\\2"
|
||||
string(REGEX REPLACE "^.*${FLEX_EXE_NAME}\"? (version )?([0-9]+[^ ]*)( .*)?$" "\\2"
|
||||
FLEX_VERSION "${FLEX_version_output}")
|
||||
unset(FLEX_EXE_NAME)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue