Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Carlisle <carlisle.b3d@gmail.com>2021-12-28 23:49:42 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2021-12-28 23:49:42 +0300
commitc32ce881e8abe2de83f916c46c7d15312ecf2798 (patch)
tree7198c3f19092e2ec75bb620b7bd720dae2a6b8ab
parent1e9175e1d714f56566a007eab5ddbb2812e89b97 (diff)
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.
-rw-r--r--source/blender/nodes/function/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/nodes/function/CMakeLists.txt b/source/blender/nodes/function/CMakeLists.txt
index 705d426a3ec..118a1fbffd1 100644
--- a/source/blender/nodes/function/CMakeLists.txt
+++ b/source/blender/nodes/function/CMakeLists.txt
@@ -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()