Fix an issue with passing NO_UNITY_BUILD_SOURCES
Amend31518f1a4e
Amend3602936230
Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ibb2fd881c02b6496f06b8b623fa6009358755a26 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
11ae4b70a1
commit
cd12c1f332
@ -111,11 +111,17 @@ function(qt_internal_add_executable name)
|
||||
endif()
|
||||
|
||||
if(arg_NO_UNITY_BUILD)
|
||||
set(arg_NO_UNITY_BUILD NO_UNITY_BUILD)
|
||||
set(arg_NO_UNITY_BUILD "NO_UNITY_BUILD")
|
||||
else()
|
||||
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}"
|
||||
SOURCES ${arg_SOURCES}
|
||||
INCLUDE_DIRECTORIES ${private_includes}
|
||||
@ -134,7 +140,7 @@ 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}
|
||||
NO_UNITY_BUILD_SOURCES ${arg_NO_UNITY_BUILD_SOURCES}
|
||||
${arg_NO_UNITY_BUILD_SOURCES}
|
||||
${arg_NO_UNITY_BUILD}
|
||||
)
|
||||
set_target_properties("${name}" PROPERTIES
|
||||
|
@ -574,11 +574,17 @@ function(qt_internal_add_module target)
|
||||
qt_internal_add_repo_local_defines("${target}")
|
||||
|
||||
if(arg_NO_UNITY_BUILD)
|
||||
set(arg_NO_UNITY_BUILD NO_UNITY_BUILD)
|
||||
set(arg_NO_UNITY_BUILD "NO_UNITY_BUILD")
|
||||
else()
|
||||
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()
|
||||
@ -614,7 +620,7 @@ 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}
|
||||
NO_UNITY_BUILD_SOURCES ${arg_NO_UNITY_BUILD_SOURCES}
|
||||
${arg_NO_UNITY_BUILD_SOURCES}
|
||||
${arg_NO_UNITY_BUILD}
|
||||
)
|
||||
|
||||
|
@ -312,12 +312,6 @@ function(qt_internal_add_plugin target)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(arg_NO_UNITY_BUILD)
|
||||
set(arg_NO_UNITY_BUILD NO_UNITY_BUILD)
|
||||
else()
|
||||
set(arg_NO_UNITY_BUILD "")
|
||||
endif()
|
||||
|
||||
set_property(TARGET "${target}" PROPERTY QT_DEFAULT_PLUGIN "${_default_plugin}")
|
||||
set_property(TARGET "${target}" APPEND PROPERTY EXPORT_PROPERTIES "QT_PLUGIN_CLASS_NAME;QT_PLUGIN_TYPE;QT_MODULE;QT_DEFAULT_PLUGIN")
|
||||
|
||||
@ -333,6 +327,18 @@ function(qt_internal_add_plugin target)
|
||||
${arg_PUBLIC_INCLUDE_DIRECTORIES}
|
||||
)
|
||||
|
||||
if(arg_NO_UNITY_BUILD)
|
||||
set(arg_NO_UNITY_BUILD "NO_UNITY_BUILD")
|
||||
else()
|
||||
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}"
|
||||
SOURCES ${arg_SOURCES}
|
||||
INCLUDE_DIRECTORIES
|
||||
@ -360,7 +366,7 @@ 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}
|
||||
NO_UNITY_BUILD_SOURCES ${arg_NO_UNITY_BUILD_SOURCES}
|
||||
${arg_NO_UNITY_BUILD_SOURCES}
|
||||
${arg_NO_UNITY_BUILD}
|
||||
)
|
||||
|
||||
|
@ -217,11 +217,13 @@ function(qt_internal_extend_target target)
|
||||
## Ignore objective-c files for PCH (not supported atm)
|
||||
qt_ignore_pch_obj_c_sources("${target}" "${arg_SOURCES}")
|
||||
|
||||
qt_update_ignore_unity_build_sources("${target}" "${arg_NO_UNITY_BUILD_SOURCES}")
|
||||
if(arg_NO_UNITY_BUILD)
|
||||
set_target_properties("${target}" PROPERTIES UNITY_BUILD OFF)
|
||||
qt_update_ignore_unity_build_sources("${target}" "${arg_SOURCES}")
|
||||
endif()
|
||||
if(arg_NO_UNITY_BUILD_SOURCES)
|
||||
qt_update_ignore_unity_build_sources("${target}" "${arg_NO_UNITY_BUILD_SOURCES}")
|
||||
endif()
|
||||
else()
|
||||
if(QT_CMAKE_DEBUG_EXTEND_TARGET)
|
||||
message("qt_extend_target(${target} CONDITION ${arg_CONDITION} ...): Skipped")
|
||||
|
@ -327,7 +327,6 @@ function(qt_internal_add_test_to_batch batch_name name)
|
||||
ENABLE_AUTOGEN_TOOLS ${arg_ENABLE_AUTOGEN_TOOLS}
|
||||
DISABLE_AUTOGEN_TOOLS ${arg_DISABLE_AUTOGEN_TOOLS}
|
||||
NO_UNITY_BUILD # Tests should not be built using UNITY_BUILD
|
||||
NO_UNITY_BUILD_SOURCES ${arg_SOURCES}
|
||||
)
|
||||
|
||||
foreach(source ${arg_SOURCES})
|
||||
|
@ -94,11 +94,17 @@ function(qt_internal_add_tool target_name)
|
||||
qt_internal_library_deprecation_level(deprecation_define)
|
||||
|
||||
if(arg_NO_UNITY_BUILD)
|
||||
set(arg_NO_UNITY_BUILD NO_UNITY_BUILD)
|
||||
set(arg_NO_UNITY_BUILD "NO_UNITY_BUILD")
|
||||
else()
|
||||
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}
|
||||
@ -124,7 +130,7 @@ function(qt_internal_add_tool target_name)
|
||||
TARGET_DESCRIPTION "${arg_TARGET_DESCRIPTION}"
|
||||
TARGET_COMPANY "${arg_TARGET_COMPANY}"
|
||||
TARGET_COPYRIGHT "${arg_TARGET_COPYRIGHT}"
|
||||
NO_UNITY_BUILD_SOURCES "${arg_NO_UNITY_BUILD_SOURCES}"
|
||||
${arg_NO_UNITY_BUILD_SOURCES}
|
||||
${arg_NO_UNITY_BUILD}
|
||||
)
|
||||
qt_internal_add_target_aliases("${target_name}")
|
||||
|
Loading…
Reference in New Issue
Block a user