configure: Fix --developer-build argument (with two hyphens)

We never properly handled double-hyphen arguments like --list-features.
However --developer-build worked by accident, because it did set
INPUT_developer_build implicitly.

Now, we don't automagically translate INPUT_foo to FEATURE_foo anymore,
and --developer-build stopped working.

Fix this by consistently handling -foo and --foo arguments.

Change-Id: Ibf32979b419c28e0a8e1f810f03ae3f295b14c69
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
Joerg Bornemann 2024-05-03 09:10:55 +02:00
parent 3377b74df9
commit ae64c54f8c

View File

@ -90,7 +90,11 @@ unset(device_options)
unset(options_json_file) unset(options_json_file)
set_property(GLOBAL PROPERTY UNHANDLED_ARGS "") set_property(GLOBAL PROPERTY UNHANDLED_ARGS "")
while(NOT "${configure_args}" STREQUAL "") while(NOT "${configure_args}" STREQUAL "")
list(POP_FRONT configure_args arg) list(POP_FRONT configure_args raw_arg)
# Condense '--foo-bar' arguments into '-foo-bar'.
string(REGEX REPLACE "^--([^-])" "-\\1" arg "${raw_arg}")
if(arg STREQUAL "-cmake-generator") if(arg STREQUAL "-cmake-generator")
list(POP_FRONT configure_args generator) list(POP_FRONT configure_args generator)
elseif(arg STREQUAL "-cmake-use-default-generator") elseif(arg STREQUAL "-cmake-use-default-generator")
@ -156,7 +160,7 @@ while(NOT "${configure_args}" STREQUAL "")
list(POP_FRONT configure_args version) list(POP_FRONT configure_args version)
is_valid_qt_hex_version("${arg}" "${version}") is_valid_qt_hex_version("${arg}" "${version}")
push("-DQT_DISABLE_DEPRECATED_UP_TO=${version}") push("-DQT_DISABLE_DEPRECATED_UP_TO=${version}")
elseif(arg STREQUAL "--") elseif(raw_arg STREQUAL "--")
# Everything after this argument will be passed to CMake verbatim. # Everything after this argument will be passed to CMake verbatim.
list(APPEND cmake_args "${configure_args}") list(APPEND cmake_args "${configure_args}")
break() break()