Merge topic 'flex-version-apple'

af06482 FindFLEX: fix version extraction on Apple
This commit is contained in:
David Cole 2012-09-04 15:47:49 -04:00 committed by CMake Topic Stage
commit d6643e9ae4
1 changed files with 1 additions and 1 deletions

View File

@ -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()