summaryrefslogtreecommitdiff
path: root/Modules/FindBISON.cmake
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2012-01-27 17:26:57 +0100
committerRolf Eike Beer <eike@sf-mail.de>2012-01-27 20:40:55 +0100
commit3cc11c2f420ef7d30d96e238b24646d8c024641e (patch)
tree47f013829b29ec6d7ef67a71abea6c02e05ae3a3 /Modules/FindBISON.cmake
parent2184cc6469c9c2803ef73c4e677e0658cf42e8cd (diff)
downloadcmake-3cc11c2f420ef7d30d96e238b24646d8c024641e.tar.gz
FindBISON: add a version expression for GNU Bison 1.x
Diffstat (limited to 'Modules/FindBISON.cmake')
-rw-r--r--Modules/FindBISON.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake
index edde9eb96c..7af3367887 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()