FindBISON: add a version expression for GNU Bison 1.x

This commit is contained in:
Rolf Eike Beer 2012-01-27 17:26:57 +01:00
parent 2184cc6469
commit 3cc11c2f42
1 changed files with 3 additions and 2 deletions

View File

@ -75,8 +75,9 @@ IF(BISON_EXECUTABLE)
ELSEIF("${BISON_version_output}" MATCHES "^bison[^+]") ELSEIF("${BISON_version_output}" MATCHES "^bison[^+]")
STRING(REGEX REPLACE "^bison \\(GNU Bison\\) ([^\n]+)\n.*" "\\1" STRING(REGEX REPLACE "^bison \\(GNU Bison\\) ([^\n]+)\n.*" "\\1"
BISON_VERSION "${BISON_version_output}") BISON_VERSION "${BISON_version_output}")
ELSE() ELSEIF("${BISON_version_output}" MATCHES "^GNU Bison ")
SET(BISON_VERSION "unknown") STRING(REGEX REPLACE "^GNU Bison (version )?([^\n]+).*" "\\2"
BISON_VERSION "${BISON_version_output}")
ENDIF() ENDIF()
ENDIF() ENDIF()