Commit: 7af01de802e6528af730c0118e88681e591a3c31
Author: Aaron Carlisle
Date:   Mon Jan 3 23:10:09 2022 -0500
Branches: master
https://developer.blender.org/rB7af01de802e6528af730c0118e88681e591a3c31

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

===================================================================

M       source/blender/nodes/shader/CMakeLists.txt

===================================================================

diff --git a/source/blender/nodes/shader/CMakeLists.txt 
b/source/blender/nodes/shader/CMakeLists.txt
index 6e2ad57865b..a665aaee5b1 100644
--- a/source/blender/nodes/shader/CMakeLists.txt
+++ b/source/blender/nodes/shader/CMakeLists.txt
@@ -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()

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to