summaryrefslogtreecommitdiff
path: root/Modules/FindBISON.cmake
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2011-11-18 16:14:54 +0100
committerDavid Cole <david.cole@kitware.com>2011-11-18 10:47:28 -0500
commit20cb5edbcaaf89c35638911c27e6aec1c7fc022f (patch)
tree1fca42544993a992e5102ae20cc645a7c10c4fb1 /Modules/FindBISON.cmake
parentf30f9a500c5e5aeb053c41307dab9987735570dd (diff)
downloadcmake-20cb5edbcaaf89c35638911c27e6aec1c7fc022f.tar.gz
FindBISON: Fix matching output of "bison --version"
The output may contain semicolons, which will confuse the IF() because of missing quoting.
Diffstat (limited to 'Modules/FindBISON.cmake')
-rw-r--r--Modules/FindBISON.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake
index 25fd51de6d..edde9eb96c 100644
--- a/Modules/FindBISON.cmake
+++ b/Modules/FindBISON.cmake
@@ -68,11 +68,11 @@ IF(BISON_EXECUTABLE)
MESSAGE(SEND_ERROR "Command \"${BISON_EXECUTABLE} --version\" failed with output:\n${BISON_version_error}")
ELSE()
# Bison++
- IF(${BISON_version_output} MATCHES "^bison\\+\\+")
+ IF("${BISON_version_output}" MATCHES "^bison\\+\\+")
STRING(REGEX REPLACE "^bison\\+\\+ Version ([^,]+).*" "\\1"
BISON_VERSION "${BISON_version_output}")
# GNU Bison
- ELSEIF(${BISON_version_output} MATCHES "^bison[^+]")
+ ELSEIF("${BISON_version_output}" MATCHES "^bison[^+]")
STRING(REGEX REPLACE "^bison \\(GNU Bison\\) ([^\n]+)\n.*" "\\1"
BISON_VERSION "${BISON_version_output}")
ELSE()