Build: Ninja: Move 'Unity builds' to heavy pooljobs.

This commit adds a new helper to define expected properties when a
target needs to use the unity build feature.

That new helper does what was already done for existing cases, and in
addition add the target to the Ninja 'heavy' pooljobs if relevant.

Pull Request: https://projects.blender.org/blender/blender/pulls/116791
This commit is contained in:
Bastien Montagne
2024-01-05 16:22:25 +01:00
committed by Gitea
parent fd0ca109b1
commit 95b30b3516
6 changed files with 19 additions and 20 deletions

View File

@@ -648,10 +648,7 @@ if(WITH_COMPOSITOR_CPU)
blender_add_lib(bf_compositor "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
if(WITH_UNITY_BUILD)
set_target_properties(bf_compositor PROPERTIES UNITY_BUILD ON)
set_target_properties(bf_compositor PROPERTIES UNITY_BUILD_BATCH_SIZE 10)
endif()
blender_set_target_unity_build(bf_compositor 10)
if(COMMAND target_precompile_headers)
target_precompile_headers(bf_compositor PRIVATE COM_precomp.h)

View File

@@ -159,10 +159,7 @@ endif()
blender_add_lib(bf_nodes_composite "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
if(WITH_UNITY_BUILD)
set_target_properties(bf_nodes_composite PROPERTIES UNITY_BUILD ON)
set_target_properties(bf_nodes_composite PROPERTIES UNITY_BUILD_BATCH_SIZE 10)
endif()
blender_set_target_unity_build(bf_nodes_composite 10)
# RNA_prototypes.h
add_dependencies(bf_nodes_composite bf_rna)

View File

@@ -72,7 +72,4 @@ list(APPEND LIB
blender_add_lib(bf_nodes_function "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
target_link_libraries(bf_nodes_functions_generated bf_nodes_function)
if(WITH_UNITY_BUILD)
set_target_properties(bf_nodes_function PROPERTIES UNITY_BUILD ON)
set_target_properties(bf_nodes_function PROPERTIES UNITY_BUILD_BATCH_SIZE 10)
endif()
blender_set_target_unity_build(bf_nodes_function 10)

View File

@@ -285,10 +285,7 @@ list(APPEND LIB
blender_add_lib(bf_nodes_geometry "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
target_link_libraries(bf_nodes_geometry_generated bf_nodes_geometry)
if(WITH_UNITY_BUILD)
set_target_properties(bf_nodes_geometry PROPERTIES UNITY_BUILD ON)
set_target_properties(bf_nodes_geometry PROPERTIES UNITY_BUILD_BATCH_SIZE 10)
endif()
blender_set_target_unity_build(bf_nodes_geometry 10)
# RNA_prototypes.h
add_dependencies(bf_nodes_geometry bf_rna)

View File

@@ -185,10 +185,7 @@ endif()
blender_add_lib(bf_nodes_shader "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
if(WITH_UNITY_BUILD)
set_target_properties(bf_nodes_shader PROPERTIES UNITY_BUILD ON)
set_target_properties(bf_nodes_shader PROPERTIES UNITY_BUILD_BATCH_SIZE 10)
endif()
blender_set_target_unity_build(bf_nodes_shader 10)
# RNA_prototypes.h
add_dependencies(bf_nodes_shader bf_rna)