Merge topic 'FindBISON-version-regex'
20cb5ed FindBISON: Fix matching output of "bison --version" f30f9a5 FindBISON: Fix bison++ version parsing to avoid "Offending entry"
This commit is contained in:
commit
e9547efa96
@ -67,8 +67,17 @@ IF(BISON_EXECUTABLE)
|
|||||||
IF(NOT ${BISON_version_result} EQUAL 0)
|
IF(NOT ${BISON_version_result} EQUAL 0)
|
||||||
MESSAGE(SEND_ERROR "Command \"${BISON_EXECUTABLE} --version\" failed with output:\n${BISON_version_error}")
|
MESSAGE(SEND_ERROR "Command \"${BISON_EXECUTABLE} --version\" failed with output:\n${BISON_version_error}")
|
||||||
ELSE()
|
ELSE()
|
||||||
STRING(REGEX REPLACE "^bison \\(GNU Bison\\) ([^\n]+)\n.*" "\\1"
|
# Bison++
|
||||||
BISON_VERSION "${BISON_version_output}")
|
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[^+]")
|
||||||
|
STRING(REGEX REPLACE "^bison \\(GNU Bison\\) ([^\n]+)\n.*" "\\1"
|
||||||
|
BISON_VERSION "${BISON_version_output}")
|
||||||
|
ELSE()
|
||||||
|
SET(BISON_VERSION "unknown")
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# internal macro
|
# internal macro
|
||||||
|
Loading…
x
Reference in New Issue
Block a user