diff options
author | Amir Masoud Abdol <amirmasoudabdol@icloud.com> | 2023-01-11 15:36:18 +0100 |
---|---|---|
committer | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-02-09 13:34:36 +0100 |
commit | bc66951940e50d1260b13acda89701aa6cbb79a7 (patch) | |
tree | 293d0dd03bf338734e1f9e83389d605ab2c50e42 /cmake/QtToolHelpers.cmake | |
parent | 814ae99a2529b1c6174dd70f1b464e16297ebd71 (diff) | |
download | qtbase-bc66951940e50d1260b13acda89701aa6cbb79a7.tar.gz |
Retire the qt_parse_all_arguments
This replaces the qt_parse_all_arguments macro with the built-in
`cmake_parse_arguments(PARSE_ARGV`. In addition, a new function,
_qt_internal_validate_all_args_are_parsed, can be used to check whether
any _UNPARSED_ARGUMENTS have been passed to the function.
Fixes: QTBUG-99238
Change-Id: I8cee83dc92dc6acdaaf747ea6ff9084c11dc649b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 7e82577680fb20413cdcfd93a982c52e9d9d095e)
Diffstat (limited to 'cmake/QtToolHelpers.cmake')
-rw-r--r-- | cmake/QtToolHelpers.cmake | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cmake/QtToolHelpers.cmake b/cmake/QtToolHelpers.cmake index 5f45932195..92bb3dc6d1 100644 --- a/cmake/QtToolHelpers.cmake +++ b/cmake/QtToolHelpers.cmake @@ -53,9 +53,12 @@ function(qt_internal_add_tool target_name) EXTRA_CMAKE_INCLUDES PUBLIC_LIBRARIES ${__default_private_args}) - qt_parse_all_arguments(arg "qt_internal_add_tool" "${option_keywords}" - "${one_value_keywords}" - "${multi_value_keywords}" ${ARGN}) + + cmake_parse_arguments(PARSE_ARGV 1 arg + "${option_keywords}" + "${one_value_keywords}" + "${multi_value_keywords}") + _qt_internal_validate_all_args_are_parsed(arg) qt_internal_find_tool(will_build_tools ${target_name} "${arg_TOOLS_TARGET}") |