summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2022-05-10 13:48:38 +0200
committerEike Ziller <eike.ziller@qt.io>2022-05-10 12:57:16 +0000
commit57a69d9d0bc6b930faf4955944ab4aaf11d459fd (patch)
treeaba0e0b279921da3444f306168665a2affbffb96
parent6b781b4fe9ea80b6ff2ccd7333bf8ae82e43d03d (diff)
downloadqt-creator-57a69d9d0bc6b930faf4955944ab4aaf11d459fd.tar.gz
CMake build: Avoid endless loop if plugin does not exist
get_property fails if the target does not exist, and _dep stays at some old value. This leads to a) a lot of cmake backtraces with an error message that doesn't add anything useful, and b) an endless loop in find_dependent_plugins. Which in the end leads to 500.000 lines of useless CMake output, repeating "qtcreator/cmake/QtCreatorAPIInternal.cmake:340 (find_dependent_plugins)" Skip get_property if the target doesn't exist. Change-Id: Ic694bc05b3dce5b83220a2f5dab8f063ef692c12 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r--cmake/QtCreatorAPIInternal.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/QtCreatorAPIInternal.cmake b/cmake/QtCreatorAPIInternal.cmake
index d7bef93491..53522ee5f7 100644
--- a/cmake/QtCreatorAPIInternal.cmake
+++ b/cmake/QtCreatorAPIInternal.cmake
@@ -295,6 +295,10 @@ function(find_dependent_plugins varName)
set(_RESULT ${ARGN})
foreach(i ${ARGN})
+ if(NOT TARGET ${i})
+ continue()
+ endif()
+ set(_dep)
get_property(_dep TARGET "${i}" PROPERTY _arg_DEPENDS)
if (_dep)
find_dependent_plugins(_REC ${_dep})