From 0075672da31b96f07279e173f35dd5a426575636 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Tue, 9 Apr 2024 14:36:38 +0200 Subject: [PATCH] Remove the headersclean feature 'headersclean' shoudn't be a feature. The respective flag should behave like command-line switch that affects the only repo that it was passed for. This also avoids propagating of the headersclean feature between the different repos when qtbase was built with the headerclean enabled. Fixes: QTBUG-121722 Change-Id: I304cbc980b06030513c015a2016678a6a0965fed Reviewed-by: Joerg Bornemann --- cmake/QtHeadersClean.cmake | 4 ++++ cmake/QtModuleHelpers.cmake | 2 +- cmake/QtProcessConfigureArgs.cmake | 7 +++++++ configure.cmake | 6 ------ qt_cmdline.cmake | 1 - 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/cmake/QtHeadersClean.cmake b/cmake/QtHeadersClean.cmake index d56b0305aed..f47ac1754c7 100644 --- a/cmake/QtHeadersClean.cmake +++ b/cmake/QtHeadersClean.cmake @@ -5,6 +5,10 @@ # ${module_headers} with a custom set of defines. This makes sure our public headers # are self-contained, and also compile with more strict compiler options. function(qt_internal_add_headersclean_target module_target module_headers) + if(INPUT_headersclean AND WASM) + message(FATAL_ERROR "The headersclean targets are not supported on WASM platform.") + endif() + get_target_property(no_headersclean_check ${module_target} _qt_no_headersclean_check) if(no_headersclean_check) return() diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake index 532167a1491..ba031730738 100644 --- a/cmake/QtModuleHelpers.cmake +++ b/cmake/QtModuleHelpers.cmake @@ -486,7 +486,7 @@ function(qt_internal_add_module target) endif() if(arg_NO_HEADERSCLEAN_CHECK OR arg_NO_MODULE_HEADERS OR arg_NO_SYNC_QT - OR NOT QT_FEATURE_headersclean) + OR NOT INPUT_headersclean) set_target_properties("${target}" PROPERTIES _qt_no_headersclean_check ON) endif() diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake index 55980f275b7..53235ee9d98 100644 --- a/cmake/QtProcessConfigureArgs.cmake +++ b/cmake/QtProcessConfigureArgs.cmake @@ -302,6 +302,11 @@ function(qt_commandline_option name) endif() endfunction() +# Add the common command line options for every qt repo. +macro(qt_add_common_commandline_options) + qt_commandline_option(headersclean TYPE boolean) +endmacro() + function(qt_commandline_prefix arg var) set(idx ${commandline_nr_of_prefixes}) set(commandline_prefix_${idx} "${arg}" "${var}" PARENT_SCOPE) @@ -318,6 +323,8 @@ set(QT_CONFIGURE_RUNNING ON) # Load qt_cmdline.cmake files #################################################################################################### +qt_add_common_commandline_options() + while(commandline_files) list(POP_FRONT commandline_files commandline_file) get_filename_component(commandline_file_directory "${commandline_file}" DIRECTORY) diff --git a/configure.cmake b/configure.cmake index 1e144ac37c0..01ee4fa3936 100644 --- a/configure.cmake +++ b/configure.cmake @@ -624,12 +624,6 @@ qt_feature("force_asserts" PUBLIC LABEL "Force assertions" AUTODETECT OFF ) -qt_feature("headersclean" - LABEL "Check for clean headers" - AUTODETECT OFF - CONDITION NOT WASM -) -qt_feature_config("headersclean" QMAKE_PRIVATE_CONFIG) qt_feature("framework" PUBLIC LABEL "Build Apple Frameworks" AUTODETECT BUILD_SHARED_LIBS diff --git a/qt_cmdline.cmake b/qt_cmdline.cmake index 9c023614a9a..ce7919709e7 100644 --- a/qt_cmdline.cmake +++ b/qt_cmdline.cmake @@ -67,7 +67,6 @@ qt_commandline_option(gdb-index TYPE boolean NAME enable_gdb_index) qt_commandline_option(gcov TYPE boolean) qt_commandline_option(gnumake TYPE boolean NAME GNUmake) qt_commandline_option(gui TYPE boolean) -qt_commandline_option(headersclean TYPE boolean) qt_commandline_option(incredibuild-xge TYPE boolean NAME incredibuild_xge) qt_commandline_option(libudev TYPE boolean) qt_commandline_option(openssl TYPE optionalString VALUES no yes linked runtime)