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 <alexandru.croitor@qt.io>
This commit is contained in:
Joerg Bornemann 2020-08-21 09:30:31 +02:00
parent e66f5e491e
commit c8fda317ea

View File

@ -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()