mirror of https://github.com/Icinga/icinga2.git
Make flex detection on Windows more robust
fixes #8913 Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
This commit is contained in:
parent
17c929aabf
commit
14fa3ceaee
|
@ -100,7 +100,7 @@ MARK_AS_ADVANCED(FL_LIBRARY)
|
|||
SET(FLEX_LIBRARIES ${FL_LIBRARY})
|
||||
|
||||
IF(FLEX_EXECUTABLE)
|
||||
|
||||
GET_FILENAME_COMPONENT(FLEX_EXECUTABLE_NAME ${FLEX_EXECUTABLE} NAME)
|
||||
EXECUTE_PROCESS(COMMAND ${FLEX_EXECUTABLE} --version
|
||||
OUTPUT_VARIABLE FLEX_version_output
|
||||
ERROR_VARIABLE FLEX_version_error
|
||||
|
@ -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_EXECUTABLE_NAME}[^ ]* (.*)$" "\\1"
|
||||
FLEX_VERSION "${FLEX_version_output}")
|
||||
ENDIF()
|
||||
|
||||
|
|
Loading…
Reference in New Issue