summaryrefslogtreecommitdiffstats
path: root/Modules/GetPrerequisites.cmake
diff options
context:
space:
mode:
authorMartin Koegler <martin.koegler@chello.at>2017-01-10 22:28:47 (GMT)
committerBrad King <brad.king@kitware.com>2017-01-11 15:57:04 (GMT)
commit17a0703d205d26048247e22174a1eda36498d341 (patch)
tree94a58d9040aebfa73c7b939e7c80feb919ed5738 /Modules/GetPrerequisites.cmake
parent914728f8d724e834a402619d05309ad8154ba59d (diff)
downloadCMake-17a0703d205d26048247e22174a1eda36498d341.zip
CMake-17a0703d205d26048247e22174a1eda36498d341.tar.gz
CMake-17a0703d205d26048247e22174a1eda36498d341.tar.bz2
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
Diffstat (limited to 'Modules/GetPrerequisites.cmake')
-rw-r--r--Modules/GetPrerequisites.cmake2
1 files changed, 2 insertions, 0 deletions
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}