From 17a0703d205d26048247e22174a1eda36498d341 Mon Sep 17 00:00:00 2001 From: Martin Koegler Date: Tue, 10 Jan 2017 23:28:47 +0100 Subject: GetPrerequisites: Do not fail on files we cannot find Historically we have always warned and skipped missing files. Since commit v3.4.0-rc1~264^2~1 (GetPrerequisites: Add error checks for execute_process() calls, 2015-07-29) we fail instead, but this was not an intentional part of that change. Restore the warn-only behavior so that missing system libraries (e.g. during cross-compiling) do not cause failure. Closes: #16523 --- Modules/GetPrerequisites.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index 72775ce..d6a78de 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -654,6 +654,8 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa if(NOT EXISTS "${target}") message("warning: target '${target}' does not exist...") + set(${prerequisites_var} "" PARENT_SCOPE) + return() endif() set(gp_cmd_paths ${gp_cmd_paths} -- cgit v0.12