summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-02-01 19:49:39 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-02-01 19:49:39 (GMT)
commit79b7fe9d5e7be36b5c9ed5cf3178d4387cdd2ed1 (patch)
tree646a8beaf2042261212713f88a6450d1eee3bc72
parenta3982c15e48cb49f5f10f0c74dd0a9144f646d09 (diff)
parent3cc11c2f420ef7d30d96e238b24646d8c024641e (diff)
downloadCMake-79b7fe9d5e7be36b5c9ed5cf3178d4387cdd2ed1.zip
CMake-79b7fe9d5e7be36b5c9ed5cf3178d4387cdd2ed1.tar.gz
CMake-79b7fe9d5e7be36b5c9ed5cf3178d4387cdd2ed1.tar.bz2
Merge topic 'more-bison-version'
3cc11c2 FindBISON: add a version expression for GNU Bison 1.x
-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()