Ignore file name extension in 'flex --version' output

refs #8750
This commit is contained in:
Gunnar Beutner 2015-03-16 13:37:11 +01:00
parent 0d7a382b82
commit e3e83ae163
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ IF(FLEX_EXECUTABLE)
MESSAGE("Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_output}\n${FLEX_version_error}\nFLEX_VERSION will not be available")
ENDIF()
ELSE()
STRING(REGEX REPLACE "^flex (.*)$" "\\1"
STRING(REGEX REPLACE "^flex[^ ]* (.*)$" "\\1"
FLEX_VERSION "${FLEX_version_output}")
ENDIF()