From 38ab29daf48f25c021ae27ed3a45b342c64e64d6 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Thu, 28 Mar 2024 11:27:11 +0100 Subject: [PATCH] Ensure that the list of modules to exclude is not empty Change-Id: I4ad2044966d793f7d2596336120942d65d2187d9 Reviewed-by: Alexandru Croitor --- cmake/QtIRGitHelpers.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/QtIRGitHelpers.cmake b/cmake/QtIRGitHelpers.cmake index c8f64b49..288f4ac7 100644 --- a/cmake/QtIRGitHelpers.cmake +++ b/cmake/QtIRGitHelpers.cmake @@ -1004,7 +1004,9 @@ macro(qt_ir_get_submodules prefix out_var_submodules) # Then remove any explicitly specified submodules. set(submodules_with_deps_and_excluded "${submodules_with_deps}") - list(REMOVE_ITEM submodules_with_deps_and_excluded ${modules_to_exclude}) + if(modules_to_exclude) + list(REMOVE_ITEM submodules_with_deps_and_excluded ${modules_to_exclude}) + endif() if(NOT perl_identical_output_for_tests AND modules_to_exclude) message(DEBUG "Repos that will be excluded after dependency handling: ${modules_to_exclude}")