diff options
author | Brad King <brad.king@kitware.com> | 2017-05-12 13:13:30 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-05-12 13:13:37 (GMT) |
commit | 793b223c02bfbb9d5bd03194a7f9748f6cecf2f2 (patch) | |
tree | 6abf181230461dcc99f98779de62bf0705158662 /Modules | |
parent | 592206a157a57da031cd44d86269a92cfb17a736 (diff) | |
parent | e0e414d6593d952facb2ce2364d17b34afac8760 (diff) | |
download | CMake-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.cmake | 6 |
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() |