configure: Warn about redundant and contradictory options

Configure will print notes in the following situations:
  - redundant options, e.g. -gui -gui
  - contradictory options, e.g. -gui -no-gui

Fixes: QTBUG-53499
Change-Id: I6cf023e7730907069cf971f5982a41453f611c3c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
bb10
Joerg Bornemann 2019-03-26 13:32:10 +01:00
parent e75e89f9de
commit 03ecdddb11
1 changed files with 7 additions and 0 deletions

View File

@ -61,6 +61,13 @@ defineTest(qtConfCommandlineSetInput) {
val = $${2}
!isEmpty($${currentConfig}.commandline.options.$${arg}.name): \
arg = $$eval($${currentConfig}.commandline.options.$${arg}.name)
!isEmpty(config.input.$$arg) {
oldval = $$eval(config.input.$$arg)
equals(oldval, $$val): \
qtConfAddNote("Option '$$arg' with value '$$val' was specified twice")
else: \
qtConfAddNote("Overriding option '$$arg' with '$$val' (was: '$$oldval')")
}
config.input.$$arg = $$val
export(config.input.$$arg)