Nodes: Enable unity build for function nodes

Unity build saves 5 seconds off the total build time when compiling `bf_nodes_function`.
Total build times went from 25s to 20s (20% reduction),
tested with ninja on linux running i5 8250U.
This commit is contained in:
Aaron Carlisle 2021-12-28 15:49:42 -05:00
parent 1e9175e1d7
commit c32ce881e8
1 changed files with 5 additions and 0 deletions

View File

@ -68,3 +68,8 @@ if(WITH_INTERNATIONAL)
endif()
blender_add_lib(bf_nodes_function "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
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()