[Cmake-commits] CMake branch, next, updated. v3.2.2-2583-g583be25

Domen Vrankar domen.vrankar at gmail.com
Wed May 6 15:57:18 EDT 2015


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  583be259f60d03db0b74905e4905f93db1bf7cc4 (commit)
       via  a62900e206b322d127ff0efc07d2d7e6da8ab412 (commit)
      from  86d8b40eac87b4b62510761d0d05782cc880e4d3 (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=583be259f60d03db0b74905e4905f93db1bf7cc4
commit 583be259f60d03db0b74905e4905f93db1bf7cc4
Merge: 86d8b40 a62900e
Author:     Domen Vrankar <domen.vrankar at gmail.com>
AuthorDate: Wed May 6 15:57:17 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed May 6 15:57:17 2015 -0400

    Merge topic 'cpack-deb-component-auto-discovery' into next
    
    a62900e2 fixup! CPack/DEB component dependency auto-discovery


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a62900e206b322d127ff0efc07d2d7e6da8ab412
commit a62900e206b322d127ff0efc07d2d7e6da8ab412
Author:     Domen Vrankar <domen.vrankar at gmail.com>
AuthorDate: Wed May 6 21:56:29 2015 +0200
Commit:     Domen Vrankar <domen.vrankar at gmail.com>
CommitDate: Wed May 6 21:56:29 2015 +0200

    fixup! CPack/DEB component dependency auto-discovery
    
    Only execute dpkg-shlibdeps if executable files linked
    to dynamically linked libraries were found inside a
    currently generated package

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 609d2ec..ac0fbe1 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -312,22 +312,24 @@ function(cpack_deb_prepare_package_vars)
         if( ${_FILE} MATCHES "ELF.*dynamically linked")
            string(REGEX MATCH "(^.*):" _FILE_NAME "${_FILE}")
            list(APPEND CPACK_DEB_BINARY_FILES "${CMAKE_MATCH_1}")
+           set(CONTAINS_EXECUTABLE_FILES_ TRUE)
         endif()
       endforeach()
 
-      message( "CPackDeb: - Generating dependency list")
+      if(CONTAINS_EXECUTABLE_FILES_)
+        message("CPackDeb: - Generating dependency list")
 
-      # Create blank control file for running dpkg-shlibdeps
-      # There might be some other way to invoke dpkg-shlibdeps without creating this file
-      # but standard debian package should not have anything that can collide with this file or directory
-      file(MAKE_DIRECTORY ${CPACK_TEMPORARY_DIRECTORY}/debian)
-      file(WRITE ${CPACK_TEMPORARY_DIRECTORY}/debian/control "")
+        # Create blank control file for running dpkg-shlibdeps
+        # There might be some other way to invoke dpkg-shlibdeps without creating this file
+        # but standard debian package should not have anything that can collide with this file or directory
+        file(MAKE_DIRECTORY ${CPACK_TEMPORARY_DIRECTORY}/debian)
+        file(WRITE ${CPACK_TEMPORARY_DIRECTORY}/debian/control "")
 
-      # only set ignore-missing-info flag for dpkg-shlibdeps that have --version option
-      # (those are newer and also have --ignore-missing-info flag)
-      if(SHLIBDEPS_EXECUTABLE_VERSION)
-        set(IGNORE_MISSING_INFO_FLAG "--ignore-missing-info")
-      endif()
+        # only set ignore-missing-info flag for dpkg-shlibdeps that have --version option
+        # (those are newer and also have --ignore-missing-info flag)
+        if(SHLIBDEPS_EXECUTABLE_VERSION)
+          set(IGNORE_MISSING_INFO_FLAG "--ignore-missing-info")
+        endif()
 
       # Execute dpkg-shlibdeps
       # --ignore-missing-info : allow dpkg-shlibdeps to run even if some libs do not belong to a package
@@ -350,24 +352,28 @@ function(cpack_deb_prepare_package_vars)
             "binary files: '${CPACK_DEB_BINARY_FILES}'")
       endif()
 
-      #Get rid of prefix generated by dpkg-shlibdeps
-      string(REGEX REPLACE "^.*Depends=" "" CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS "${SHLIBDEPS_OUTPUT}")
+        #Get rid of prefix generated by dpkg-shlibdeps
+        string(REGEX REPLACE "^.*Depends=" "" CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS "${SHLIBDEPS_OUTPUT}")
 
-      if(CPACK_DEBIAN_PACKAGE_DEBUG)
-        message( "CPackDeb Debug: Found dependency: ${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
-      endif()
+        if(CPACK_DEBIAN_PACKAGE_DEBUG)
+          message( "CPackDeb Debug: Found dependency: ${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
+        endif()
 
-      # Remove blank control file
-      # Might not be safe if package actual contain file or directory named debian
-      file(REMOVE_RECURSE "${CPACK_TEMPORARY_DIRECTORY}/debian")
+        # Remove blank control file
+        # Might not be safe if package actual contain file or directory named debian
+        file(REMOVE_RECURSE "${CPACK_TEMPORARY_DIRECTORY}/debian")
 
-      # Append user depend if set
-      if(CPACK_DEBIAN_PACKAGE_DEPENDS)
-        set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}, ${CPACK_DEBIAN_PACKAGE_DEPENDS}")
+        # Append user depend if set
+        if(CPACK_DEBIAN_PACKAGE_DEPENDS)
+          set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}, ${CPACK_DEBIAN_PACKAGE_DEPENDS}")
+        else()
+          set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
+        endif()
       else()
-        set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
+        if(CPACK_DEBIAN_PACKAGE_DEBUG)
+          message( "CPackDeb Debug: Using only user-provided depends because package does not contain executable files.")
+        endif()
       endif()
-
     else()
       if(CPACK_DEBIAN_PACKAGE_DEBUG)
         message( "CPackDeb Debug: Using only user-provided depends because dpkg-shlibdeps is not found.")

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

Summary of changes:
 Modules/CPackDeb.cmake |   54 +++++++++++++++++++++++++++---------------------
 1 file changed, 30 insertions(+), 24 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list