diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2012-08-30 13:33:27 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2012-08-30 13:34:41 (GMT) |
commit | af06482d24799106dbf5a2cbd82d20d034df2b45 (patch) | |
tree | 38287d2f7642dd066e1bedfe78e9fefea84a45a2 /Modules/FindFLEX.cmake | |
parent | 3e72df14845fff7830701a9fd8d587968ad43d4a (diff) | |
download | CMake-af06482d24799106dbf5a2cbd82d20d034df2b45.zip CMake-af06482d24799106dbf5a2cbd82d20d034df2b45.tar.gz CMake-af06482d24799106dbf5a2cbd82d20d034df2b45.tar.bz2 |
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.
Diffstat (limited to 'Modules/FindFLEX.cmake')
-rw-r--r-- | Modules/FindFLEX.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake index e397d28..daae94f 100644 --- a/Modules/FindFLEX.cmake +++ b/Modules/FindFLEX.cmake @@ -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() |