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>2022-01-12 00:55:18 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2022-01-12 00:55:45 +0300
commit5a6ec0f0035b6bb8a75b18826f4d0f687ec5ec21 (patch)
tree70f22be347a5324c6176d3362a583bbe397a6dda
parent48ff9b57f8a53828b30ddbed94df89564b012b44 (diff)
Build: Enable unity build for `bf_compositor`
Blender's compositor code already makes extensive use of namespace which makes it very simple to enable unity build. There was one duplicated function that has since to be moved to a common header. I saw roughly a 3x speedup of bf_compositor using ninja on linux using i5 8250u (1:34 down to 0:34). Reviewed By: LazyDodo Differential Revision: https://developer.blender.org/D13792
-rw-r--r--source/blender/compositor/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt
index af8ba0a24a5..88ce9b88097 100644
--- a/source/blender/compositor/CMakeLists.txt
+++ b/source/blender/compositor/CMakeLists.txt
@@ -645,6 +645,11 @@ endif()
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()
+
if(COMMAND target_precompile_headers)
target_precompile_headers(bf_compositor PRIVATE COM_precomp.h)
endif()