summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-07-09 14:02:41 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-07-09 14:02:41 (GMT)
commit77e4f5490e3a14a265b931f79bcb621d164389d6 (patch)
tree1cae2b7bbf329326d1425a867a22d55224c21fc8 /Modules
parentd30acf347b557ca2f9b83f5955e3ffdb74416a87 (diff)
parent49f32168546ea8f2ef8e6a2e65c114c07edd0e69 (diff)
downloadCMake-77e4f5490e3a14a265b931f79bcb621d164389d6.zip
CMake-77e4f5490e3a14a265b931f79bcb621d164389d6.tar.gz
CMake-77e4f5490e3a14a265b931f79bcb621d164389d6.tar.bz2
Merge topic 'CMakeExpandImportedTargets-CMP0045'
49f32168 CMakeExpandImportedTargets: Do not read property on non-target (#15008)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeExpandImportedTargets.cmake12
1 files changed, 10 insertions, 2 deletions
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}")