diff --git a/cmake/QtExecutableHelpers.cmake b/cmake/QtExecutableHelpers.cmake index 5efeb2a2457..a556dca6c1c 100644 --- a/cmake/QtExecutableHelpers.cmake +++ b/cmake/QtExecutableHelpers.cmake @@ -116,14 +116,10 @@ function(qt_internal_add_executable name) set(arg_NO_UNITY_BUILD "") endif() - if(arg_NO_UNITY_BUILD_SOURCES) - set(arg_NO_UNITY_BUILD_SOURCES "NO_UNITY_BUILD_SOURCES ${arg_NO_UNITY_BUILD_SOURCES}") - else() - set(arg_NO_UNITY_BUILD_SOURCES "") - endif() - qt_internal_extend_target("${name}" + ${arg_NO_UNITY_BUILD} SOURCES ${arg_SOURCES} + NO_UNITY_BUILD_SOURCES ${arg_NO_UNITY_BUILD_SOURCES} INCLUDE_DIRECTORIES ${private_includes} DEFINES ${arg_DEFINES} LIBRARIES @@ -140,8 +136,6 @@ function(qt_internal_add_executable name) MOC_OPTIONS ${arg_MOC_OPTIONS} ENABLE_AUTOGEN_TOOLS ${arg_ENABLE_AUTOGEN_TOOLS} DISABLE_AUTOGEN_TOOLS ${arg_DISABLE_AUTOGEN_TOOLS} - ${arg_NO_UNITY_BUILD_SOURCES} - ${arg_NO_UNITY_BUILD} ) set_target_properties("${name}" PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${arg_OUTPUT_DIRECTORY}" diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake index a6baeecd949..ec5a4ae4f87 100644 --- a/cmake/QtModuleHelpers.cmake +++ b/cmake/QtModuleHelpers.cmake @@ -579,19 +579,17 @@ function(qt_internal_add_module target) set(arg_NO_UNITY_BUILD "") endif() - if(arg_NO_UNITY_BUILD_SOURCES) - set(arg_NO_UNITY_BUILD_SOURCES "NO_UNITY_BUILD_SOURCES ${arg_NO_UNITY_BUILD_SOURCES}") - else() - set(arg_NO_UNITY_BUILD_SOURCES "") - endif() - if(NOT arg_EXTERNAL_HEADERS) set(arg_EXTERNAL_HEADERS "") endif() + qt_internal_extend_target("${target}" + ${arg_NO_UNITY_BUILD} SOURCES ${arg_SOURCES} ${arg_EXTERNAL_HEADERS} + NO_UNITY_BUILD_SOURCES + ${arg_NO_UNITY_BUILD_SOURCES} INCLUDE_DIRECTORIES ${private_includes} SYSTEM_INCLUDE_DIRECTORIES @@ -620,8 +618,6 @@ function(qt_internal_add_module target) DISABLE_AUTOGEN_TOOLS ${arg_DISABLE_AUTOGEN_TOOLS} PRECOMPILED_HEADER ${arg_PRECOMPILED_HEADER} NO_PCH_SOURCES ${arg_NO_PCH_SOURCES} - ${arg_NO_UNITY_BUILD_SOURCES} - ${arg_NO_UNITY_BUILD} ) # The public module define is not meant to be used when building the module itself, diff --git a/cmake/QtPluginHelpers.cmake b/cmake/QtPluginHelpers.cmake index 835541fe099..b4aaffb8bbf 100644 --- a/cmake/QtPluginHelpers.cmake +++ b/cmake/QtPluginHelpers.cmake @@ -333,14 +333,11 @@ function(qt_internal_add_plugin target) set(arg_NO_UNITY_BUILD "") endif() - if(arg_NO_UNITY_BUILD_SOURCES) - set(arg_NO_UNITY_BUILD_SOURCES "NO_UNITY_BUILD_SOURCES ${arg_NO_UNITY_BUILD_SOURCES}") - else() - set(arg_NO_UNITY_BUILD_SOURCES "") - endif() - qt_internal_extend_target("${target}" + ${arg_NO_UNITY_BUILD} SOURCES ${arg_SOURCES} + NO_UNITY_BUILD_SOURCES + ${arg_NO_UNITY_BUILD_SOURCES} INCLUDE_DIRECTORIES ${private_includes} SYSTEM_INCLUDE_DIRECTORIES @@ -366,8 +363,6 @@ function(qt_internal_add_plugin target) MOC_OPTIONS ${arg_MOC_OPTIONS} ENABLE_AUTOGEN_TOOLS ${arg_ENABLE_AUTOGEN_TOOLS} DISABLE_AUTOGEN_TOOLS ${arg_DISABLE_AUTOGEN_TOOLS} - ${arg_NO_UNITY_BUILD_SOURCES} - ${arg_NO_UNITY_BUILD} ) qt_internal_add_repo_local_defines("${target}") diff --git a/cmake/QtToolHelpers.cmake b/cmake/QtToolHelpers.cmake index c63828ef8c7..e097fc3ff04 100644 --- a/cmake/QtToolHelpers.cmake +++ b/cmake/QtToolHelpers.cmake @@ -99,17 +99,13 @@ function(qt_internal_add_tool target_name) set(arg_NO_UNITY_BUILD "") endif() - if(arg_NO_UNITY_BUILD_SOURCES) - set(arg_NO_UNITY_BUILD_SOURCES "NO_UNITY_BUILD_SOURCES ${arg_NO_UNITY_BUILD_SOURCES}") - else() - set(arg_NO_UNITY_BUILD_SOURCES "") - endif() - qt_internal_add_executable("${target_name}" OUTPUT_DIRECTORY "${output_dir}" ${exceptions} NO_INSTALL + ${arg_NO_UNITY_BUILD} SOURCES ${arg_SOURCES} + NO_UNITY_BUILD_SOURCES ${arg_NO_UNITY_BUILD_SOURCES} INCLUDE_DIRECTORIES ${arg_INCLUDE_DIRECTORIES} DEFINES @@ -130,8 +126,6 @@ function(qt_internal_add_tool target_name) TARGET_DESCRIPTION "${arg_TARGET_DESCRIPTION}" TARGET_COMPANY "${arg_TARGET_COMPANY}" TARGET_COPYRIGHT "${arg_TARGET_COPYRIGHT}" - ${arg_NO_UNITY_BUILD_SOURCES} - ${arg_NO_UNITY_BUILD} ) qt_internal_add_target_aliases("${target_name}") _qt_internal_apply_strict_cpp("${target_name}")