From 03ecdddb11ca71682d5d3b18bd4b74b9f9b2a3d6 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 26 Mar 2019 13:32:10 +0100 Subject: [PATCH] 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 --- mkspecs/features/qt_configure.prf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index a9b1eef589..168a8e64f2 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -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)