diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2024-03-03 11:06:17 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2024-03-04 16:24:46 +0100 |
commit | 7c8bab37bb792086f38d704f37bc8b712311d0f7 (patch) | |
tree | 5795ab8f86f147abc80a177339f144570323bef4 | |
parent | 6c57ec909d53a0e50dff37dbc3c75adedae6d7be (diff) |
Fix the broken standalone -submodules argument in top-level configure
Make sure that -submodules argument is processed when we assume that
the top-level Qt meta repository is already initialized.
Amends 2c9664ca33d2ed3d8236c865a489c9e7c5885f68
Fixes: QTBUG-122954
Change-Id: Id7a325c2dd670667e8b0fdcd607b52080b118f4f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r-- | cmake/QtIRHelpers.cmake | 5 | ||||
-rw-r--r-- | cmake/QtTopLevelHelpers.cmake | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/cmake/QtIRHelpers.cmake b/cmake/QtIRHelpers.cmake index 3b20fa1e..7327ed18 100644 --- a/cmake/QtIRHelpers.cmake +++ b/cmake/QtIRHelpers.cmake @@ -102,6 +102,8 @@ endfunction() # into the final list of submodules to be included and excluded, which are then translated # to configure -submodules and -skip options. function(qt_ir_get_args_from_optfile_configure_filtered optfile_path out_var) + cmake_parse_arguments(arg "ALREADY_INITIALIZED" "" "" ${ARGV}) + # Get args unknown to init-repository, and pass them to configure as-is. qt_ir_get_unknown_args(unknown_args) @@ -114,6 +116,9 @@ function(qt_ir_get_args_from_optfile_configure_filtered optfile_path out_var) qt_ir_get_option_value(module-subset submodules) if(submodules) qt_ir_get_top_level_submodules(include_submodules exclude_submodules) + if(NOT include_submodules AND arg_ALREADY_INITIALIZED) + set(include_submodules "${submodules}") + endif() # qtrepotools is always implicitly cloned, but it doesn't actually # have a CMakeLists.txt, so remove it. diff --git a/cmake/QtTopLevelHelpers.cmake b/cmake/QtTopLevelHelpers.cmake index c7058efb..1198771e 100644 --- a/cmake/QtTopLevelHelpers.cmake +++ b/cmake/QtTopLevelHelpers.cmake @@ -7,10 +7,14 @@ macro(qt_tl_include_all_helpers) endmacro() function(qt_tl_run_toplevel_configure top_level_src_path) + cmake_parse_arguments(arg "ALREADY_INITIALIZED" "" "" ${ARGV}) + + qt_ir_get_cmake_flag(ALREADY_INITIALIZED arg_ALREADY_INITIALIZED) + # Filter out init-repository specific arguments before passing them to # configure. - qt_ir_get_args_from_optfile_configure_filtered("${OPTFILE}" configure_args) - + qt_ir_get_args_from_optfile_configure_filtered("${OPTFILE}" configure_args + ${arg_ALREADY_INITIALIZED}) # Get the path to the qtbase configure script. set(qtbase_dir_name "qtbase") set(configure_path "${top_level_src_path}/${qtbase_dir_name}/configure") @@ -50,7 +54,7 @@ function(qt_tl_run_main_script) endif() # Then run configure out-of-process. - qt_tl_run_toplevel_configure("${TOP_LEVEL_SRC_PATH}") + qt_tl_run_toplevel_configure("${TOP_LEVEL_SRC_PATH}" ${exit_reason}) endfunction() # Populates $out_module_list with all subdirectories that have a CMakeLists.txt file |