diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2024-01-04 11:18:14 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2024-02-13 20:11:21 +0100 |
commit | 55d81b3eff1ef44a071b9bb91d6ba01b0bda8fe9 (patch) | |
tree | 2055eb9ed57bb9177df33d7b6675af31d0f7a376 | |
parent | be009c6857dc75c0bdf789c4ac9323f0cf1fd9e6 (diff) |
CMake: Remove qt_internal_compute_features_from_possible_inputs
This function calculated the values of the features 'no-prefix' and
'developer-build' from INPUT_* values. Since configure directly
translates -no-prefix and -developer-build to FEATURE_no_prefix and
FEATURE_developer_build, we can remove the function.
Task-number: QTBUG-120529
Change-Id: Ide1fa61af175d8f6a6aa6363dfdfa94912836345
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r-- | cmake/QtBuildHelpers.cmake | 11 | ||||
-rw-r--r-- | cmake/QtBuildRepoHelpers.cmake | 32 | ||||
-rw-r--r-- | cmake/QtFeature.cmake | 16 |
3 files changed, 0 insertions, 59 deletions
diff --git a/cmake/QtBuildHelpers.cmake b/cmake/QtBuildHelpers.cmake index dc83954e48..adaa107cba 100644 --- a/cmake/QtBuildHelpers.cmake +++ b/cmake/QtBuildHelpers.cmake @@ -378,11 +378,7 @@ endmacro() macro(qt_internal_setup_build_and_global_variables) qt_internal_validate_cmake_generator() qt_internal_set_qt_building_qt() - qt_internal_compute_features_from_possible_inputs() - - # Depends on qt_internal_compute_features_from_possible_inputs qt_internal_set_cmake_build_type() - qt_internal_set_message_log_level(CMAKE_MESSAGE_LOG_LEVEL) qt_internal_unset_extra_build_internals_vars() qt_internal_get_generator_is_multi_config() @@ -392,23 +388,16 @@ macro(qt_internal_setup_build_and_global_variables) qt_internal_setup_position_independent_code() qt_internal_set_link_depends_no_shared() - - # Depends on qt_internal_compute_features_from_possible_inputs qt_internal_setup_default_install_prefix() - qt_internal_set_qt_source_tree_var() qt_internal_set_export_compile_commands() qt_internal_set_configure_from_ide() - # Depends on qt_internal_compute_features_from_possible_inputs # Depends on qt_internal_set_configure_from_ide qt_internal_set_sync_headers_at_configure_time() - # Depends on qt_internal_compute_features_from_possible_inputs - qt_internal_setup_build_benchmarks() - # Depends on qt_internal_compute_features_from_possible_inputs # Depends on qt_internal_setup_build_benchmarks qt_internal_setup_build_tests() diff --git a/cmake/QtBuildRepoHelpers.cmake b/cmake/QtBuildRepoHelpers.cmake index 6b2918f748..bcee2b5a87 100644 --- a/cmake/QtBuildRepoHelpers.cmake +++ b/cmake/QtBuildRepoHelpers.cmake @@ -756,35 +756,6 @@ function(qt_build_internals_set_up_system_prefixes) endif() endfunction() -# Set FEATURE_${feature} if INPUT_${feature} is set in certain circumstances. -# Set FEATURE_${feature}_computed_from_input to TRUE or FALSE depending on whether the -# INPUT_${feature} value has overridden the FEATURE_${feature} variable. -# -# Needs to be in QtBuildInternalsConfig.cmake instead of QtFeature.cmake because it's used in -# qt_build_internals_disable_pkg_config_if_needed. -function(qt_internal_compute_feature_value_from_possible_input feature) - # If FEATURE_ is not defined try to use the INPUT_ variable to enable/disable feature. - # If FEATURE_ is defined and the configure script is being used (so - # QT_INTERNAL_CALLED_FROM_CONFIGURE is TRUE), ignore the FEATURE_ variable, and take into - # account the INPUT_ variable instead, because a command line argument takes priority over - # a pre-cached FEATURE_ variable. - if((NOT DEFINED FEATURE_${feature} OR QT_INTERNAL_CALLED_FROM_CONFIGURE) - AND DEFINED INPUT_${feature} - AND NOT "${INPUT_${feature}}" STREQUAL "undefined" - AND NOT "${INPUT_${feature}}" STREQUAL "") - if(INPUT_${feature}) - set(FEATURE_${feature} ON) - else() - set(FEATURE_${feature} OFF) - endif() - - set(FEATURE_${feature} "${FEATURE_${feature}}" PARENT_SCOPE) - set(FEATURE_${feature}_computed_from_input TRUE PARENT_SCOPE) - else() - set(FEATURE_${feature}_computed_from_input FALSE PARENT_SCOPE) - endif() -endfunction() - function(qt_build_internals_disable_pkg_config_if_needed) # pkg-config should not be used by default on Darwin and Windows platforms (and QNX), as defined # in the qtbase/configure.json. Unfortunately by the time the feature is evaluated there are @@ -810,9 +781,6 @@ function(qt_build_internals_disable_pkg_config_if_needed) set(pkg_config_enabled OFF) endif() - # Features won't have been evaluated yet if this is the first run, have to evaluate this here - qt_internal_compute_feature_value_from_possible_input(pkg_config) - # If user explicitly specified a value for the feature, honor it, even if it might break # the build. if(DEFINED FEATURE_pkg_config) diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake index 46f39da887..3aac7aaa24 100644 --- a/cmake/QtFeature.cmake +++ b/cmake/QtFeature.cmake @@ -414,8 +414,6 @@ function(qt_evaluate_feature feature) qt_evaluate_config_expression(emit_if ${arg_EMIT_IF}) endif() - qt_internal_compute_feature_value_from_possible_input("${feature}") - # Warn about a feature which is not emitted, but the user explicitly provided a value for it. if(NOT emit_if AND DEFINED FEATURE_${feature}) set(msg "") @@ -879,8 +877,6 @@ function(qt_internal_detect_dirty_features) message(STATUS "Checking for feature set changes") set_property(GLOBAL PROPERTY _qt_feature_clean TRUE) foreach(feature ${QT_KNOWN_FEATURES}) - qt_internal_compute_feature_value_from_possible_input("${feature}") - if(DEFINED "FEATURE_${feature}" AND NOT "${QT_FEATURE_${feature}}" STREQUAL "${FEATURE_${feature}}") message(" '${feature}' was changed from ${QT_FEATURE_${feature}} " @@ -915,18 +911,6 @@ function(qt_internal_detect_dirty_features) endif() endfunction() -macro(qt_internal_compute_features_from_possible_inputs) - # Pre-calculate the developer_build feature if it's set by the user via the I - # NPUT_developer_build variable when using the configure script. When not using configure, don't - # take the INPUT variable into account, so that users can toggle the feature directly in the - # cache or via IDE. - qt_internal_compute_feature_value_from_possible_input(developer_build) - - # Pre-calculate the no_prefix feature if it's set by configure via INPUT_no_prefix. - # This needs to be done before qtbase/configure.cmake is processed. - qt_internal_compute_feature_value_from_possible_input(no_prefix) -endmacro() - function(qt_config_compile_test name) if(DEFINED "TEST_${name}") return() |