From 3cc11c2f420ef7d30d96e238b24646d8c024641e Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Fri, 27 Jan 2012 17:26:57 +0100 Subject: [PATCH] FindBISON: add a version expression for GNU Bison 1.x --- Modules/FindBISON.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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()