From 2404c5c52f8ad548855763bd052fa27b696192d4 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Wed, 28 May 2025 15:23:59 +0200 Subject: [PATCH] ConfigureBuildQt: Do another round of configure After all repos are configured and built, do another round of reconfigure. This can catch issues in the find_package of plugins. E.g. when running the builds for qtbase -> qtdeclarative -> qtmultimedia, during the first pass qtdeclarative is reconfigured without any plugins present, but in the second pass additional plugins will be added in the `find_package` chain. Change-Id: I298492463e38e57f250ee22f1e8c7f880ce9940a Reviewed-by: Alexandru Croitor --- .../RunCMake/ConfigureBuildQt/Utils.cmake | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/manual/RunCMake/ConfigureBuildQt/Utils.cmake b/tests/manual/RunCMake/ConfigureBuildQt/Utils.cmake index b179041f..e56993c3 100644 --- a/tests/manual/RunCMake/ConfigureBuildQt/Utils.cmake +++ b/tests/manual/RunCMake/ConfigureBuildQt/Utils.cmake @@ -1214,6 +1214,39 @@ function(qt_build_helper) ) endif() endforeach() + + # Do another round of reconfigure (and in certain cases rebuild) after all submodules were built + # This will include any plugin navigations in the find_package calls + if(arg_RECONFIGURE_WITHOUT_ARGS_IMMEDIATELY + OR arg_RECONFIGURE_WITHOUT_ARGS_AFTER_BUILD) + foreach(repo_name IN LISTS repos_to_process) + set(repo_path "${source_dir}/${repo_name}") + set(test_name "${arg_TEST_NAME}_${repo_name}") + + set(common_args + TEST_NAME "${test_name}" + REPO_NAME "${repo_name}" + REPO_PATH "${repo_path}" + TOP_LEVEL_SOURCE_DIR_PATH "${source_dir}" + BUILD_DIR_ROOT_PATH "${build_dir_root}" + ${extra_args} + ) + + call_cmake_in_qt_build_dir( + ${common_args} + LOG_LEVEL STATUS + ) + + if(arg_BUILD_AFTER_RECONFIGURE) + build_qt( + IS_REBUILD + BUILD_VERBOSE + BUILD_NINJA_EXPLAIN + ${common_args} + ) + endif() + endforeach() + endif() endfunction() function(add_test_case)