Show the allowed values for configure arguments

Just some help to users, so they can spot the allowed values without
looking into docs.

Pick-to: 6.6
Change-Id: I22ad9533104949286de447a05a6e875e8d933bf6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexey Edelev 2023-09-13 13:33:16 +02:00
parent 569dc0de50
commit 47a42b9c6a

View File

@ -374,7 +374,9 @@ function(qtConfValidateValue opt val out_var)
endforeach()
set(${out_var} FALSE PARENT_SCOPE)
qtConfAddError("Invalid value '${val}' supplied to command line option '${opt}'.")
list(JOIN valid_values " " valid_values_str)
qtConfAddError("Invalid value '${val}' supplied to command line option '${opt}'."
"\nAllowed values: ${valid_values_str}\n")
endfunction()
function(qt_commandline_mapped_enum_value opt key out_var)