Skip to content
Permalink
Browse files

Raised minimal Bison version to 2.4 (for QgsExpression). Fixed bison …

…version detection.
  • Loading branch information
wonder-sk committed Aug 30, 2011
1 parent 7f8d388 commit 466d50d11e19ea365344c9623db0913faf35efc5
Showing with 5 additions and 5 deletions.
  1. +5 −5 cmake/Bison.cmake
@@ -27,11 +27,11 @@ MACRO(FIND_BISON)
# get first line in case it's multiline
STRING(REGEX REPLACE "([^\n]+).*" "\\1" FIRST_LINE "${BISON_VERSION_STR}")
# get version information
STRING(REGEX REPLACE ".* ([0-9]+)\\.([0-9]+)" "\\1" BISON_VERSION_MAJOR "${FIRST_LINE}")
STRING(REGEX REPLACE ".* ([0-9]+)\\.([0-9]+)" "\\2" BISON_VERSION_MINOR "${FIRST_LINE}")
IF (BISON_VERSION_MAJOR LESS 2)
MESSAGE (FATAL_ERROR "Bison version is too old (${BISON_VERSION_MAJOR}.${BISON_VERSION_MINOR}). Use 2.0 or higher.")
ENDIF (BISON_VERSION_MAJOR LESS 2)
STRING(REGEX REPLACE ".* ([0-9]+)\\.([0-9]+)(\\..*)?" "\\1" BISON_VERSION_MAJOR "${FIRST_LINE}")
STRING(REGEX REPLACE ".* ([0-9]+)\\.([0-9]+)(\\..*)?" "\\2" BISON_VERSION_MINOR "${FIRST_LINE}")
IF (BISON_VERSION_MAJOR LESS 2 OR (BISON_VERSION_MAJOR EQUAL 2 AND BISON_VERSION_MINOR LESS 4))
MESSAGE (FATAL_ERROR "Bison version is too old (${BISON_VERSION_MAJOR}.${BISON_VERSION_MINOR}). Use 2.4 or higher.")
ENDIF (BISON_VERSION_MAJOR LESS 2 OR (BISON_VERSION_MAJOR EQUAL 2 AND BISON_VERSION_MINOR LESS 4))

ENDIF (NOT BISON_EXECUTABLE)
ENDIF(NOT BISON_EXECUTABLE)

0 comments on commit 466d50d

Please sign in to comment.
You can’t perform that action at this time.