From 33bc82f466ced4bb0a0d1bff2b6a161370b044f5 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Tue, 16 Feb 2021 15:54:50 +0100 Subject: [PATCH] Do not rewrite boolean INPUTs if they have a corresponding feature Initial replacement of boolean INPUT_ variables to the FEATURE_ variables was wrongly changed to updating of the INPUT_ variable value to ON/OFF value. This causes potential issues when INPUT_ variable has explicit check for 'yes' or 'no'. The feature evaluation step enables FEATURE_ variables in case if the corresponding INPUT_ variable contains a positive CMake value. So there is no need to process boolean INPUTs at the argument processing step. Also no need to keep the special opengl case, since it will be processed correctly. Fixes: QTBUG-91158 Change-Id: I96bb7903a904ae3cf788d7ef7d4e0c019046eb95 Reviewed-by: Joerg Bornemann (cherry picked from commit 530b62934923070b5b8b5c5b3c764a2b7d4db039) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtProcessConfigureArgs.cmake | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake index bc42a20c5c5..431e6f3dcb7 100644 --- a/cmake/QtProcessConfigureArgs.cmake +++ b/cmake/QtProcessConfigureArgs.cmake @@ -727,11 +727,6 @@ if("${INPUT_ltcg}" STREQUAL "yes") endforeach() endif() -if(NOT "${INPUT_opengl}" STREQUAL "") - drop_input(opengl) - push("-DINPUT_opengl=${INPUT_opengl}") -endif() - translate_list_input(device-option QT_QMAKE_DEVICE_OPTIONS) translate_list_input(defines QT_EXTRA_DEFINES) translate_list_input(fpaths QT_EXTRA_FRAMEWORKPATHS) @@ -739,13 +734,6 @@ translate_list_input(includes QT_EXTRA_INCLUDEPATHS) translate_list_input(lpaths QT_EXTRA_LIBDIRS) translate_list_input(rpaths QT_EXTRA_RPATHS) -foreach(feature ${commandline_known_features}) - qt_feature_normalize_name("${feature}" cmake_feature) - if(${feature} IN_LIST config_inputs) - translate_boolean_input(${feature} INPUT_${cmake_feature}) - endif() -endforeach() - foreach(input ${config_inputs}) qt_feature_normalize_name("${input}" cmake_input) push("-DINPUT_${cmake_input}=${INPUT_${input}}")