diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-08-21 09:30:31 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-08-23 11:04:38 +0200 |
commit | c8fda317ea12914ee51c20fe8bd256454cdb6cfe (patch) | |
tree | d55eb99cba3a6b4f6bac2a287ffb67772868c03f /cmake | |
parent | e66f5e491e1a47a49f2a8823d04ef83aa6ef7744 (diff) |
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>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtProcessConfigureArgs.cmake | 12 |
1 files changed, 7 insertions, 5 deletions
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() |