[Cmake-commits] CMake branch, next, updated. v3.0.0-4134-gc3faff3

Brad King brad.king at kitware.com
Mon Jul 7 11:04:07 EDT 2014


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  c3faff3094fa3f67ea72900801f2eea278654ef4 (commit)
       via  49f32168546ea8f2ef8e6a2e65c114c07edd0e69 (commit)
      from  ae3b051f3d7df69ccc09db9b8dbe3cabe2df05e2 (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=c3faff3094fa3f67ea72900801f2eea278654ef4
commit c3faff3094fa3f67ea72900801f2eea278654ef4
Merge: ae3b051 49f3216
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 7 11:04:06 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jul 7 11:04:06 2014 -0400

    Merge topic 'CMakeExpandImportedTargets-CMP0045' into next
    
    49f32168 CMakeExpandImportedTargets: Do not read property on non-target (#15008)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=49f32168546ea8f2ef8e6a2e65c114c07edd0e69
commit 49f32168546ea8f2ef8e6a2e65c114c07edd0e69
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 7 10:58:43 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 7 10:58:43 2014 -0400

    CMakeExpandImportedTargets: Do not read property on non-target (#15008)
    
    Avoid behavior that is disallowed by CMP0045.  Check whether a target
    exists before trying to read its properties.

diff --git a/Modules/CMakeExpandImportedTargets.cmake b/Modules/CMakeExpandImportedTargets.cmake
index 0752e04..b6ab7ef 100644
--- a/Modules/CMakeExpandImportedTargets.cmake
+++ b/Modules/CMakeExpandImportedTargets.cmake
@@ -71,7 +71,11 @@ function(CMAKE_EXPAND_IMPORTED_TARGETS _RESULT )
       set(_CCSR_NEW_REQ_LIBS )
       set(_CHECK_FOR_IMPORTED_TARGETS FALSE)
       foreach(_CURRENT_LIB ${_CCSR_REQ_LIBS})
-         get_target_property(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS)
+         if(TARGET "${_CURRENT_LIB}")
+           get_target_property(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS)
+         else()
+           set(_importedConfigs "")
+         endif()
          if (_importedConfigs)
 #            message(STATUS "Detected imported target ${_CURRENT_LIB}")
             # Ok, so this is an imported target.
@@ -123,7 +127,11 @@ function(CMAKE_EXPAND_IMPORTED_TARGETS _RESULT )
    # all remaining imported target names (there shouldn't be any left anyway).
    set(_CCSR_NEW_REQ_LIBS )
    foreach(_CURRENT_LIB ${_CCSR_REQ_LIBS})
-      get_target_property(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS)
+      if(TARGET "${_CURRENT_LIB}")
+        get_target_property(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS)
+      else()
+        set(_importedConfigs "")
+      endif()
       if (NOT _importedConfigs)
          list(APPEND _CCSR_NEW_REQ_LIBS "${_CURRENT_LIB}" )
 #         message(STATUS "final: appending ${_CURRENT_LIB}")

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

Summary of changes:
 Modules/CMakeExpandImportedTargets.cmake |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list