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:
authorRay Molenkamp <github@lazydodo.com>2020-02-07 17:27:40 +0300
committerRay Molenkamp <github@lazydodo.com>2020-02-07 17:27:40 +0300
commit6477fcf40f541bcb8de24aa8023df53775cc7827 (patch)
treeabdb20301bd2239b23fd32f363fe966767dd3348 /CMakeLists.txt
parent1a93bc2db874b10054ad2814dff5705ce751963a (diff)
BuildSystem/Cleanup: Fix warning behaviour regarding library dependencies
Adding USD to a lite build fails to build due to boost errors, when you turn boost on and rebuild still boost errors, boost was silently turned off since it was not deemed needed. Once boost was forced on, it still fails due to TBB being off. This patch fixes: - The Silent disabling of boost - Add a check that USD is is not on before doing that - move the TBB checks to a central location rather than the individual platform files - Add USD to the TBB checks. Differential Revision: https://developer.blender.org/D6479 Reviewers: brecht, sybren
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt36
1 files changed, 16 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 509de9943e2..60656a9e4fa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -613,29 +613,25 @@ endif()
# enable boost for cycles, audaspace or i18n
# otherwise if the user disabled
-if(NOT WITH_BOOST)
- # Explicitly disabled. so disable all deps.
- macro(set_and_warn
- _setting _val)
- if(${${_setting}})
- message(STATUS "'WITH_BOOST' is disabled: forcing 'set(${_setting} ${_val})'")
- endif()
- set(${_setting} ${_val})
- endmacro()
-
- set_and_warn(WITH_CYCLES OFF)
- set_and_warn(WITH_INTERNATIONAL OFF)
- set_and_warn(WITH_OPENVDB OFF)
- set_and_warn(WITH_OPENCOLORIO OFF)
- set_and_warn(WITH_QUADRIFLOW OFF)
-elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
- WITH_OPENVDB OR WITH_OPENCOLORIO)
- # Keep enabled
-else()
- # Disable boost if not needed.
+
+set_and_warn_dependency(WITH_BOOST WITH_CYCLES OFF)
+set_and_warn_dependency(WITH_BOOST WITH_INTERNATIONAL OFF)
+set_and_warn_dependency(WITH_BOOST WITH_OPENVDB OFF)
+set_and_warn_dependency(WITH_BOOST WITH_OPENCOLORIO OFF)
+set_and_warn_dependency(WITH_BOOST WITH_QUADRIFLOW OFF)
+set_and_warn_dependency(WITH_BOOST WITH_USD OFF)
+
+if(NOT (WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
+ WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_USD))
+ message(STATUS "No dependencies need 'WITH_BOOST' forcing WITH_BOOST=OFF")
set(WITH_BOOST OFF)
endif()
+set_and_warn_dependency(WITH_TBB WITH_USD OFF)
+set_and_warn_dependency(WITH_TBB WITH_OPENIMAGEDENOISE OFF)
+set_and_warn_dependency(WITH_TBB WITH_OPENVDB OFF)
+set_and_warn_dependency(WITH_TBB WITH_MOD_FLUID OFF)
+
# auto enable openimageio for cycles
if(WITH_CYCLES)
set(WITH_OPENIMAGEIO ON)