diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake index edde9eb96..7af336788 100644 --- a/Modules/FindBISON.cmake +++ b/Modules/FindBISON.cmake @@ -75,8 +75,9 @@ IF(BISON_EXECUTABLE) ELSEIF("${BISON_version_output}" MATCHES "^bison[^+]") STRING(REGEX REPLACE "^bison \\(GNU Bison\\) ([^\n]+)\n.*" "\\1" BISON_VERSION "${BISON_version_output}") - ELSE() - SET(BISON_VERSION "unknown") + ELSEIF("${BISON_version_output}" MATCHES "^GNU Bison ") + STRING(REGEX REPLACE "^GNU Bison (version )?([^\n]+).*" "\\2" + BISON_VERSION "${BISON_version_output}") ENDIF() ENDIF()