summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-12 13:13:30 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-05-12 13:13:37 (GMT)
commit793b223c02bfbb9d5bd03194a7f9748f6cecf2f2 (patch)
tree6abf181230461dcc99f98779de62bf0705158662 /Modules
parent592206a157a57da031cd44d86269a92cfb17a736 (diff)
parente0e414d6593d952facb2ce2364d17b34afac8760 (diff)
downloadCMake-793b223c02bfbb9d5bd03194a7f9748f6cecf2f2.zip
CMake-793b223c02bfbb9d5bd03194a7f9748f6cecf2f2.tar.gz
CMake-793b223c02bfbb9d5bd03194a7f9748f6cecf2f2.tar.bz2
Merge topic 'getprerequisites-fix'
e0e414d6 GetPrerequisites: Only recurse on resolved unseen prerequisites Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !804
Diffstat (limited to 'Modules')
-rw-r--r--Modules/GetPrerequisites.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index a3b97ab..0090cdc 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -943,7 +943,11 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
#
if(NOT list_length_before_append EQUAL list_length_after_append)
gp_resolve_item("${target}" "${item}" "${exepath}" "${dirs}" resolved_item "${rpaths}")
- set(unseen_prereqs ${unseen_prereqs} "${resolved_item}")
+ if(EXISTS "${resolved_item}")
+ # Recurse only if we could resolve the item.
+ # Otherwise the prerequisites_var list will be cleared
+ set(unseen_prereqs ${unseen_prereqs} "${resolved_item}")
+ endif()
endif()
endif()
endif()