From c8fda317ea12914ee51c20fe8bd256454cdb6cfe Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 21 Aug 2020 09:30:31 +0200 Subject: CMake: Fix configure setting superfluous features Command line options like -debug result in setting the variable INPUT_debug. INPUT_debug is mapped to the CMake argument -DCMAKE_BUILD_TYPE=Debug. INPUT_debug also matches the feature 'debug', and the CMake argument -DFEATURE_debug=ON was passed. Do not pass -DFEATURE_xxx CMake arguments for inputs that are already handled. Change-Id: If096dff1c6dd694545c6f671f5f3512a43c3ec50 Reviewed-by: Alexandru Croitor --- cmake/QtProcessConfigureArgs.cmake | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'cmake/QtProcessConfigureArgs.cmake') diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake index 9a6370cca2..7e3f789a7c 100644 --- a/cmake/QtProcessConfigureArgs.cmake +++ b/cmake/QtProcessConfigureArgs.cmake @@ -526,11 +526,6 @@ macro(translate_list_input name cmake_var) endif() endmacro() -foreach(feature ${commandline_known_features}) - qt_feature_normalize_name("${feature}" cmake_feature) - translate_boolean_input(${feature} FEATURE_${cmake_feature}) -endforeach() - translate_boolean_input(precompile_header BUILD_WITH_PCH) translate_boolean_input(ccache QT_USE_CCACHE) translate_boolean_input(shared BUILD_SHARED_LIBS) @@ -607,6 +602,13 @@ 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} FEATURE_${cmake_feature}) + endif() +endforeach() + foreach(input ${config_inputs}) push("-DINPUT_${input}=${INPUT_${input}}") endforeach() -- cgit v1.2.3