summaryrefslogtreecommitdiffstats
path: root/Modules/FindBISON.cmake
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2012-01-27 16:26:57 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2012-01-27 19:40:55 (GMT)
commit3cc11c2f420ef7d30d96e238b24646d8c024641e (patch)
tree47f013829b29ec6d7ef67a71abea6c02e05ae3a3 /Modules/FindBISON.cmake
parent2184cc6469c9c2803ef73c4e677e0658cf42e8cd (diff)
downloadCMake-3cc11c2f420ef7d30d96e238b24646d8c024641e.zip
CMake-3cc11c2f420ef7d30d96e238b24646d8c024641e.tar.gz
CMake-3cc11c2f420ef7d30d96e238b24646d8c024641e.tar.bz2
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 edde9eb..7af3367 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()