]> granicus.if.org Git - icinga2/commitdiff
Ignore file name extension in 'flex --version' output
authorGunnar Beutner <gunnar@beutner.name>
Mon, 16 Mar 2015 12:37:11 +0000 (13:37 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Mon, 16 Mar 2015 12:37:11 +0000 (13:37 +0100)
refs #8750

third-party/cmake/FindFLEX.cmake

index cd54832c3f190ee32afd13f6d15185d4eae6fa09..bc931d46a38092e55ee5df3c338443e67e666a66 100644 (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()