diff options
author | Ray Molenkamp <github@lazydodo.com> | 2020-02-07 17:27:40 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2020-02-07 17:27:40 +0300 |
commit | 6477fcf40f541bcb8de24aa8023df53775cc7827 (patch) | |
tree | abdb20301bd2239b23fd32f363fe966767dd3348 /build_files/cmake/macros.cmake | |
parent | 1a93bc2db874b10054ad2814dff5705ce751963a (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 'build_files/cmake/macros.cmake')
-rw-r--r-- | build_files/cmake/macros.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 2d13476f09a..daf156bc3f2 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -1157,3 +1157,13 @@ macro(blender_precompile_headers target cpp header) set_source_files_properties(${cpp} PROPERTIES COMPILE_FLAGS "/Yc${header} /Fp${pchfinal}") endif() endmacro() + +macro(set_and_warn_dependency + _dependency _setting _val) + # when $_dependency is disabled, forces $_setting = $_val + if(NOT ${${_dependency}} AND ${${_setting}}) + message(STATUS "'${_dependency}' is disabled: forcing 'set(${_setting} ${_val})'") + set(${_setting} ${_val}) + endif() +endmacro() + |