Update the implementation of -unity-build
I added the ability to use `-no-unity-build`, and included the batch size in the config.summary as well. In addition, qt_feature is not being used for `-unity-build` anymore. Pick-to: 6.5 6.6 Change-Id: I4a10e03d3505336d2256280ed2854ec0425df47f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
cd7995de57
commit
f607e22d59
@ -139,13 +139,6 @@ while(NOT "${configure_args}" STREQUAL "")
|
|||||||
list(POP_FRONT configure_args version)
|
list(POP_FRONT configure_args version)
|
||||||
is_valid_qt_hex_version("${arg}" "${version}")
|
is_valid_qt_hex_version("${arg}" "${version}")
|
||||||
push("-DQT_DISABLE_DEPRECATED_UP_TO=${version}")
|
push("-DQT_DISABLE_DEPRECATED_UP_TO=${version}")
|
||||||
elseif(arg STREQUAL "-unity-build")
|
|
||||||
push("-DQT_UNITY_BUILD=ON")
|
|
||||||
# QT_UNITY_BUILD_BATCH_SIZE will be set to 8, CMake's default.
|
|
||||||
elseif(arg STREQUAL "-unity-build-batch-size")
|
|
||||||
list(POP_FRONT configure_args unity_build_batch_size)
|
|
||||||
is_non_empty_valid_arg("${arg}" "${unity_build_batch_size}")
|
|
||||||
push("-DQT_UNITY_BUILD_BATCH_SIZE=${unity_build_batch_size}")
|
|
||||||
elseif(arg STREQUAL "--")
|
elseif(arg STREQUAL "--")
|
||||||
# Everything after this argument will be passed to CMake verbatim.
|
# Everything after this argument will be passed to CMake verbatim.
|
||||||
list(APPEND cmake_args "${configure_args}")
|
list(APPEND cmake_args "${configure_args}")
|
||||||
@ -830,6 +823,8 @@ endfunction()
|
|||||||
drop_input(commercial)
|
drop_input(commercial)
|
||||||
drop_input(confirm-license)
|
drop_input(confirm-license)
|
||||||
translate_boolean_input(precompile_header BUILD_WITH_PCH)
|
translate_boolean_input(precompile_header BUILD_WITH_PCH)
|
||||||
|
translate_boolean_input(unity_build QT_UNITY_BUILD)
|
||||||
|
translate_string_input(unity_build_batch_size QT_UNITY_BUILD_BATCH_SIZE)
|
||||||
translate_boolean_input(ccache QT_USE_CCACHE)
|
translate_boolean_input(ccache QT_USE_CCACHE)
|
||||||
translate_boolean_input(vcpkg QT_USE_VCPKG)
|
translate_boolean_input(vcpkg QT_USE_VCPKG)
|
||||||
translate_boolean_input(shared BUILD_SHARED_LIBS)
|
translate_boolean_input(shared BUILD_SHARED_LIBS)
|
||||||
|
@ -1023,11 +1023,6 @@ qt_feature("ccache"
|
|||||||
CONDITION QT_USE_CCACHE
|
CONDITION QT_USE_CCACHE
|
||||||
)
|
)
|
||||||
qt_feature_config("ccache" QMAKE_PRIVATE_CONFIG)
|
qt_feature_config("ccache" QMAKE_PRIVATE_CONFIG)
|
||||||
qt_feature("unity-build"
|
|
||||||
LABEL "Unity Build"
|
|
||||||
AUTODETECT 1
|
|
||||||
CONDITION QT_UNITY_BUILD
|
|
||||||
)
|
|
||||||
qt_feature("static_runtime"
|
qt_feature("static_runtime"
|
||||||
LABEL "Statically link the C/C++ runtime library"
|
LABEL "Statically link the C/C++ runtime library"
|
||||||
AUTODETECT OFF
|
AUTODETECT OFF
|
||||||
@ -1070,7 +1065,16 @@ qt_configure_add_summary_entry(
|
|||||||
CONDITION UNIX
|
CONDITION UNIX
|
||||||
)
|
)
|
||||||
qt_configure_add_summary_entry(
|
qt_configure_add_summary_entry(
|
||||||
ARGS "unity-build"
|
TYPE "message" ARGS "Unity Build" MESSAGE "yes" CONDITION QT_UNITY_BUILD
|
||||||
|
)
|
||||||
|
qt_configure_add_summary_entry(
|
||||||
|
TYPE "message" ARGS "Unity Build" MESSAGE "no" CONDITION NOT QT_UNITY_BUILD
|
||||||
|
)
|
||||||
|
qt_configure_add_summary_entry(
|
||||||
|
TYPE "message"
|
||||||
|
ARGS "Unity Build Batch Size"
|
||||||
|
MESSAGE "${QT_UNITY_BUILD_BATCH_SIZE}"
|
||||||
|
CONDITION QT_UNITY_BUILD
|
||||||
)
|
)
|
||||||
qt_configure_add_summary_entry(
|
qt_configure_add_summary_entry(
|
||||||
TYPE "firstAvailableFeature"
|
TYPE "firstAvailableFeature"
|
||||||
|
@ -43,6 +43,8 @@ qt_commandline_option(avx TYPE boolean)
|
|||||||
qt_commandline_option(avx2 TYPE boolean)
|
qt_commandline_option(avx2 TYPE boolean)
|
||||||
qt_commandline_option(avx512 TYPE boolean NAME avx512f)
|
qt_commandline_option(avx512 TYPE boolean NAME avx512f)
|
||||||
qt_commandline_option(c++std TYPE cxxstd)
|
qt_commandline_option(c++std TYPE cxxstd)
|
||||||
|
qt_commandline_option(unity-build TYPE boolean NAME unity_build)
|
||||||
|
qt_commandline_option(unity-build-batch-size TYPE string NAME unity_build_batch_size)
|
||||||
qt_commandline_option(ccache TYPE boolean NAME ccache)
|
qt_commandline_option(ccache TYPE boolean NAME ccache)
|
||||||
qt_commandline_option(vcpkg TYPE boolean)
|
qt_commandline_option(vcpkg TYPE boolean)
|
||||||
qt_commandline_option(commercial TYPE void)
|
qt_commandline_option(commercial TYPE void)
|
||||||
|
Loading…
Reference in New Issue
Block a user