diff options
| author | Alexandru Croitor <[email protected]> | 2025-11-17 15:01:32 +0100 |
|---|---|---|
| committer | Alexandru Croitor <[email protected]> | 2025-11-20 16:06:21 +0100 |
| commit | 979151cb3d8bdae0fb0894277772056299da9954 (patch) | |
| tree | 86e040ca590e22ccbb8240ab5e4d62d985265347 /cmake | |
| parent | 30b1715a3b9eb2fd33bb3874bbd50547013c59a0 (diff) | |
CMake: Clean up cmake_parse_arguments use in qt_feature_module_begin
And qt_feature_module_begin.
Break the options into variables.
Use the PARSE_ARGV form.
Pick-to: 6.8 6.10
Change-Id: I227d382c797e4570f6e3b644ad10801d6d97440b
Reviewed-by: Joerg Bornemann <[email protected]>
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/QtFeature.cmake | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake index de0323214c5..6adf2fba920 100644 --- a/cmake/QtFeature.cmake +++ b/cmake/QtFeature.cmake @@ -4,10 +4,20 @@ include(CheckCXXCompilerFlag) function(qt_feature_module_begin) - cmake_parse_arguments(PARSE_ARGV 0 arg - "NO_MODULE;ONLY_EVALUATE_FEATURES" - "LIBRARY;PRIVATE_FILE;PUBLIC_FILE" - "PUBLIC_DEPENDENCIES;PRIVATE_DEPENDENCIES") + set(opt_args + NO_MODULE + ONLY_EVALUATE_FEATURES + ) + set(single_args + LIBRARY + PRIVATE_FILE + PUBLIC_FILE + ) + set(multi_args + PUBLIC_DEPENDENCIES + PRIVATE_DEPENDENCIES + ) + cmake_parse_arguments(PARSE_ARGV 0 arg "${opt_args}" "${single_args}" "${multi_args}") _qt_internal_validate_all_args_are_parsed(arg) if(NOT arg_ONLY_EVALUATE_FEATURES) @@ -1180,10 +1190,15 @@ function(qt_feature_record_summary_entries list_of_paths) endfunction() function(qt_feature_module_end) - set(flags ONLY_EVALUATE_FEATURES) - set(options OUT_VAR_PREFIX) - set(multiopts) - cmake_parse_arguments(arg "${flags}" "${options}" "${multiopts}" ${ARGN}) + set(opt_args + ONLY_EVALUATE_FEATURES + ) + set(single_args + OUT_VAR_PREFIX + ) + set(multi_args "") + cmake_parse_arguments(PARSE_ARGV 0 arg "${opt_args}" "${single_args}" "${multi_args}") + set(target ${arg_UNPARSED_ARGUMENTS}) # The value of OUT_VAR_PREFIX is used as a prefix for output variables that should be |
