[Cmake-commits] CMake branch, next, updated. v2.8.2-437-g69f80a9
Alexander Neundorf
neundorf at kde.org
Sat Aug 14 16:20:49 EDT 2010
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 69f80a94a3e132cfa0b009d6f2d030bb7e5de40d (commit)
via 75e727855ae860d4289c9dafa8247a4cb3b5852f (commit)
from 2d1510b82cb4b3a76df15e25cd76e7ecd8243fcb (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=69f80a94a3e132cfa0b009d6f2d030bb7e5de40d
commit 69f80a94a3e132cfa0b009d6f2d030bb7e5de40d
Merge: 2d1510b 75e7278
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Sat Aug 14 22:19:20 2010 +0200
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Sat Aug 14 22:19:20 2010 +0200
Merge branch 'FixZLIBVersion' into next
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=75e727855ae860d4289c9dafa8247a4cb3b5852f
commit 75e727855ae860d4289c9dafa8247a4cb3b5852f
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Sat Aug 14 22:16:06 2010 +0200
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Sat Aug 14 22:16:06 2010 +0200
Fix ZLIB version parsing if no TWEAK version exists
ZLIB_VERSION_STRING was "1.2.3.#define ZLIB_VERSION "1.2.3"" here, because
the result of the matching for the tweak version was also appended if there
was no TWEAK version and the regexp failed, which gives as result not
an empty string, but the full string.
Now it is only appended if the regexp matches.
Alex
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index ce29ca0..1ac6c2c 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -50,9 +50,14 @@ IF(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
STRING(REGEX REPLACE "^.*ZLIB_VERSION \"([0-9]+).*$" "\\1" ZLIB_VERSION_MAJOR "${ZLIB_H}")
STRING(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_MINOR "${ZLIB_H}")
STRING(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_PATCH "${ZLIB_H}")
- STRING(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_TWEAK "${ZLIB_H}")
+ SET(ZLIB_VERSION_STRING "${ZLIB_VERSION_MAJOR}.${ZLIB_VERSION_MINOR}.${ZLIB_VERSION_PATCH}")
- SET(ZLIB_VERSION_STRING "${ZLIB_VERSION_MAJOR}.${ZLIB_VERSION_MINOR}.${ZLIB_VERSION_PATCH}.${ZLIB_VERSION_TWEAK}")
+ # only append a TWEAK version if it exists:
+ SET(ZLIB_VERSION_TWEAK "")
+ IF( "${ZLIB_H}" MATCHES "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$")
+ SET(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_1}")
+ SET(ZLIB_VERSION_STRING "${ZLIB_VERSION_STRING}.${ZLIB_VERSION_TWEAK}")
+ ENDIF( "${ZLIB_H}" MATCHES "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$")
SET(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}")
SET(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}")
-----------------------------------------------------------------------
Summary of changes:
Modules/FindZLIB.cmake | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list