[Cmake-commits] CMake branch, next, updated. v2.8.2-693-g5b3c8e8

David Cole david.cole at kitware.com
Tue Sep 7 22:22:44 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  5b3c8e8f7ad977afae0fe6f9a2957c50a16f7c05 (commit)
       via  e93a4b4d3421ced7b8c852b76c0dcb427f798df8 (commit)
      from  5c85df3208a91ad54e21240e6915f00984be2274 (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=5b3c8e8f7ad977afae0fe6f9a2957c50a16f7c05
commit 5b3c8e8f7ad977afae0fe6f9a2957c50a16f7c05
Merge: 5c85df3 e93a4b4
Author:     David Cole <david.cole at kitware.com>
AuthorDate: Tue Sep 7 22:22:41 2010 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Sep 7 22:22:41 2010 -0400

    Merge topic 'fix-10417' into next
    
    e93a4b4 Avoid adding self as prerequisite. (#10417)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e93a4b4d3421ced7b8c852b76c0dcb427f798df8
commit e93a4b4d3421ced7b8c852b76c0dcb427f798df8
Author:     David Cole <david.cole at kitware.com>
AuthorDate: Tue Sep 7 21:29:43 2010 -0400
Commit:     David Cole <david.cole at kitware.com>
CommitDate: Tue Sep 7 21:29:43 2010 -0400

    Avoid adding self as prerequisite. (#10417)
    
    Thanks to Clinton Stimpson for the patch.

diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index b48c61e..b4755f1 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -412,7 +412,7 @@ function(get_bundle_keys app libs dirs keys_var)
     # but that do not show up in otool -L output...)
     #
     foreach(lib ${libs})
-      set_bundle_key_values(${keys_var} "${lib}" "${lib}" "${exepath}" "${dirs}" 1)
+      set_bundle_key_values(${keys_var} "${lib}" "${lib}" "${exepath}" "${dirs}" 0)
 
       set(prereqs "")
       get_prerequisites("${lib}" prereqs 1 1 "${exepath}" "${dirs}")
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index 847db34..c83da4f 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -634,6 +634,23 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
   string(REGEX REPLACE ";" "\\\\;" candidates "${gp_cmd_ov}")
   string(REGEX REPLACE "\n" "${eol_char};" candidates "${candidates}")
 
+  # check for install id and remove it from list, since otool -L can include a
+  # reference to itself
+  set(gp_install_id)
+  if("${gp_tool}" STREQUAL "otool")
+    execute_process(
+      COMMAND otool -D ${target}
+      OUTPUT_VARIABLE gp_install_id_ov
+      )
+    # second line is install name
+    string(REGEX REPLACE ".*:\n" "" gp_install_id "${gp_install_id_ov}")
+    if(gp_install_id)
+      # trim
+      string(REGEX MATCH "[^\n ].*[^\n ]" gp_install_id "${gp_install_id}")
+      #message("INSTALL ID is \"${gp_install_id}\"")
+    endif(gp_install_id)
+  endif("${gp_tool}" STREQUAL "otool")
+
   # Analyze each line for file names that match the regular expression:
   #
   foreach(candidate ${candidates})
@@ -670,14 +687,18 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
     #
     set(add_item 1)
 
-    if(${exclude_system})
+    if("${item}" STREQUAL "${gp_install_id}")
+      set(add_item 0)
+    endif("${item}" STREQUAL "${gp_install_id}")
+
+    if(add_item AND ${exclude_system})
       set(type "")
       gp_resolved_file_type("${target}" "${item}" "${exepath}" "${dirs}" type)
 
       if("${type}" STREQUAL "system")
         set(add_item 0)
       endif("${type}" STREQUAL "system")
-    endif(${exclude_system})
+    endif(add_item AND ${exclude_system})
 
     if(add_item)
       list(LENGTH ${prerequisites_var} list_length_before_append)

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

Summary of changes:
 Modules/BundleUtilities.cmake  |    2 +-
 Modules/GetPrerequisites.cmake |   25 +++++++++++++++++++++++--
 2 files changed, 24 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list