[Cmake-commits] CMake branch, next, updated. v2.8.7-2061-g93ff355

Rolf Eike Beer eike at sf-mail.de
Tue Jan 10 15:26:50 EST 2012


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  93ff3554553270b680265f52903e0c7bb8785e2f (commit)
       via  201cf33271093d0e50e4c88c795e595a2fd55327 (commit)
      from  f6d971ce36658c4089f1ae5dad4091c2b901e9f9 (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=93ff3554553270b680265f52903e0c7bb8785e2f
commit 93ff3554553270b680265f52903e0c7bb8785e2f
Merge: f6d971c 201cf33
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Jan 10 15:26:46 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 10 15:26:46 2012 -0500

    Merge topic 'bug10950' into next
    
    201cf33 make sure to use the correct header if using shipped zlib or bzip2 (#10950)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=201cf33271093d0e50e4c88c795e595a2fd55327
commit 201cf33271093d0e50e4c88c795e595a2fd55327
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Jan 10 19:46:50 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Tue Jan 10 20:08:40 2012 +0100

    make sure to use the correct header if using shipped zlib or bzip2 (#10950)
    
    If we use the shipped libraries we need to make sure to use our own header
    since a possibly broken header may exist in the system include directories.

diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index 7f7a69f..ae7246e 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -169,7 +169,13 @@ FIND_PACKAGE(ZLIB)
 IF(ZLIB_FOUND)
   SET(HAVE_LIBZ 1)
   SET(HAVE_ZLIB_H 1)
-  INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
+  # if we use the internal version make sure to include our header first
+  # before something that may hang around in the system include dirs
+  IF(ZLIB_INCLUDE_DIR MATCHES "^${CMAKE_SOURCE_DIR}.*")
+    INCLUDE_DIRECTORIES(BEFORE ${ZLIB_INCLUDE_DIR})
+  ELSE()
+    INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
+  ENDIF()
   LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES})
   IF(WIN32 AND NOT CYGWIN)
     SET(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR})
@@ -190,7 +196,13 @@ FIND_PACKAGE(BZip2)
 IF(BZIP2_FOUND)
   SET(HAVE_LIBBZ2 1)
   SET(HAVE_BZLIB_H 1)
-  INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR})
+  # if we use the internal version make sure to include our header first
+  # before something that may hang around in the system include dirs
+  IF(BZIP2_INCLUDE_DIR MATCHES "^${CMAKE_SOURCE_DIR}.*")
+    INCLUDE_DIRECTORIES(BEFORE ${BZIP2_INCLUDE_DIR})
+  ELSE()
+    INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR})
+  ENDIF()
   LIST(APPEND ADDITIONAL_LIBS ${BZIP2_LIBRARIES})
 ENDIF(BZIP2_FOUND)
 MARK_AS_ADVANCED(CLEAR BZIP2_INCLUDE_DIR)

-----------------------------------------------------------------------

Summary of changes:
 Utilities/cmlibarchive/CMakeLists.txt |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list