Shader Nodes: Unity Build

Enable unity builds for  `bf_nodes_shader`, gives about a 2.7x speedup
of total compile times when just building `bf_nodes_shader`.
On my machine, this equates to saving about 30 seconds.

Differential Revision: https://developer.blender.org/D13720
This commit is contained in:
Aaron Carlisle 2022-01-03 23:10:09 -05:00 committed by Aaron Carlisle
parent a9e0caa92d
commit 7af01de802
1 changed files with 5 additions and 0 deletions

View File

@ -166,3 +166,8 @@ if(WITH_FREESTYLE)
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()