diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2019-05-21 01:45:41 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2019-05-21 01:59:16 +0300 |
commit | 711d1f7591adb07456380ceaef61c5e3d4666e19 (patch) | |
tree | 49ffc950ccec019e3c9b80aea9e72889fb86dae4 /build_files/cmake | |
parent | 42c0bd2e90a4f4a21152495ba2742eb33629ade4 (diff) | |
parent | e78770039397d98e8fa60281e42c8f15ed63e9ab (diff) |
Merge branch 'master' into sculpt-mode-features
Diffstat (limited to 'build_files/cmake')
-rw-r--r-- | build_files/cmake/macros.cmake | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 90f07e7edc7..098792d4be6 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -285,6 +285,26 @@ function(blender_add_lib set_property(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name}) endfunction() +# Ninja only: assign 'heavy pool' to some targets that are especially RAM-consuming to build. +function(setup_heavy_lib_pool) + if(WITH_NINJA_POOL_JOBS AND NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS) + if(WITH_CYCLES) + list(APPEND _HEAVY_LIBS "cycles_device" "cycles_kernel") + endif() + if(WITH_LIBMV) + list(APPEND _HEAVY_LIBS "bf_intern_libmv") + endif() + if(WITH_OPENVDB) + list(APPEND _HEAVY_LIBS "bf_intern_openvdb") + endif() + + foreach(TARGET ${_HEAVY_LIBS}) + if(TARGET ${TARGET}) + set_property(TARGET ${TARGET} PROPERTY JOB_POOL_COMPILE compile_heavy_job_pool) + endif() + endforeach() + endif() +endfunction() function(SETUP_LIBDIRS) |