[Cmake-commits] CMake branch, next, updated. v2.8.6-1835-g621055b
Brad King
brad.king at kitware.com
Fri Nov 11 16:51:37 EST 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 621055bbdacc566683ff67967c65cc1da33aed6a (commit)
via f30f9a500c5e5aeb053c41307dab9987735570dd (commit)
from a0cadefcf9ebd1a5ee51155de232c7c564eab617 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=621055bbdacc566683ff67967c65cc1da33aed6a
commit 621055bbdacc566683ff67967c65cc1da33aed6a
Merge: a0cadef f30f9a5
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 11 16:51:36 2011 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Nov 11 16:51:36 2011 -0500
Merge topic 'FindBISON-version-regex' into next
f30f9a5 FindBISON: Fix bison++ version parsing to avoid "Offending entry"
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f30f9a500c5e5aeb053c41307dab9987735570dd
commit f30f9a500c5e5aeb053c41307dab9987735570dd
Author: Ondrej Balaz <ondra at blami.net>
AuthorDate: Fri Nov 11 19:13:55 2011 +0000
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Nov 11 16:50:23 2011 -0500
FindBISON: Fix bison++ version parsing to avoid "Offending entry"
I've just found out that use of FindBISON.cmake shipped with CMake 2.8
on system where bison++ is default bison executable (e.g. Debian Linux)
will result in corrupted CMakeCache.txt file and parse error due to
"Offending entry"
As FindBISON.cmake logic used to obtain installed bison executable
version is tailored to match only the message used in GNU Bison it fails
on absolutely different Bison++ version message and whole version
message including \n characters is stored into BISON_VERSION which is
then dumped into CMakeCache.txt, so everything after first \n character
makes "Offending entry".
diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake
index e855a27..25fd51d 100644
--- a/Modules/FindBISON.cmake
+++ b/Modules/FindBISON.cmake
@@ -67,8 +67,17 @@ IF(BISON_EXECUTABLE)
IF(NOT ${BISON_version_result} EQUAL 0)
MESSAGE(SEND_ERROR "Command \"${BISON_EXECUTABLE} --version\" failed with output:\n${BISON_version_error}")
ELSE()
- STRING(REGEX REPLACE "^bison \\(GNU Bison\\) ([^\n]+)\n.*" "\\1"
- BISON_VERSION "${BISON_version_output}")
+ # 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[^+]")
+ STRING(REGEX REPLACE "^bison \\(GNU Bison\\) ([^\n]+)\n.*" "\\1"
+ BISON_VERSION "${BISON_version_output}")
+ ELSE()
+ SET(BISON_VERSION "unknown")
+ ENDIF()
ENDIF()
# internal macro
-----------------------------------------------------------------------
Summary of changes:
Modules/FindBISON.cmake | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list