Commit Graph

2570 Commits

Author SHA1 Message Date
Ray Molenkamp c7b00ef625 MSVC: Fix cmake warnings with MSVC updates
CMake caches the location of the CRT runtime in the
MSVC_REDIST_DIR variable, and uses it to copy the required
dll's during the install phase.

This variable is only initialized when it does not exist.
Leading to issues when compiler updates are installed and
the compiler version slightly changes, cmake still looks
in the old location for the runtime and warns about the
files not existing.

This change fixes the issue by checking if the redist dir
exists and if not unsets it so InstallRequiredSystemLibraries
can have another go at figuring out where they live.
2020-09-03 12:39:49 -06:00
Stefan Werner c8b84a13a5 Make deps: Disabled assembly for GMP on Apple/arm64.
This appears to be a configuration for which GMP has no assembly,
yet the default configure script tries to build it.
2020-09-03 10:11:59 +02:00
Sybren A. Stüvel 23767937ef USD: remove library initialisation hack
Remove the hack for library initialisation; this is no longer necessary
as the required information can be passed to the USD library after its
static initialisers have run.

This new approach is compatible with both the patched and original USD
library. This means that platform maintainers don't need to rebuild the
USD library until the next upgrade.

Manifest Task: https://developer.blender.org/T80320
2020-09-01 17:29:01 +02:00
Sybren A. Stüvel 07899ddd22 Fix double include of `gmp.cmake`
This fixes `make deps` complaining about the `extern_gmp` project being
defined twice.
2020-09-01 12:39:58 +02:00
Sergey Sharybin c2df6658ee CMake: Fix linking errors with gmp library
gmpxx library (C++ version of gmp) uses symbols from libgmp, which means
the libgmp is to be passed to the linker after libgmpxx.
2020-09-01 11:31:47 +02:00
Ray Molenkamp 7056f180d3 cleanup: Fix GMP spacing in cmake configurations
It now follows the spacing around it.
2020-08-31 09:42:58 -06:00
Sybren A. Stüvel f5866f484f Remove patch for HDF5 library
Delete `hdf5.diff`, because it's no longer used. Since Blender 2.90 the
optional support for HDF5 has been dropped, but this file accidentally
wasn't deleted.

See 0102b9d47e and 0c38436227.

No functional changes.
2020-08-31 17:32:28 +02:00
Howard Trickey 7844486e47 Change cmake configs for full and release to enable WITH_GMP. 2020-08-28 11:49:10 -04:00
Howard Trickey 9e09b5c418 Merge newboolean branch into master.
This is for design task T67744, Boolean Redesign.
It adds a choice of solver to the Boolean modifier and the
Intersect (Boolean) and Intersect (Knife) tools.
The 'Fast' choice is the current Bmesh boolean.
The new 'Exact' choice is a more advanced algorithm that supports
overlapping geometry and uses more robust calculations, but is
slower than the Fast choice.
The default with this commit is set to 'Exact'. We can decide before
the 2.91 release whether or not this is the right choice, but this
choice now will get us more testing and feedback on the new code.
2020-08-28 11:01:06 -04:00
Ray Molenkamp eed8ea1b73 Cleanup: Fix white space in versions.cmake 2020-08-27 11:03:31 -06:00
Sebastian Parborg 91aeb452ab Fix: FindEmbree.cmake looking for non existing dynamic libraries and failing
It is now possible to build against a shared embree library.
Before it was only possible to build against static Embree libraries.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D8702
2020-08-27 11:55:40 +02:00
Ray Molenkamp bbf00a6231 Cleanup: Fix build warning with MSVC and OSL
OSL requires RTTI to be off, this is done with the /GR- flag for
MSVC, however /GR is in the default CXX flags leading to warning

D9025 : overriding '/GR' with '/GR-'

which cannot be suppressed.

/GR is on by default and this flag is not required, so removing
it from the default CXX flags makes it possible later use /GR-
without generating warnings.
2020-08-26 22:20:34 -06:00
bastien d8cf6ee316 install_deps: add fontconfig to installed libs/tools. 2020-08-26 20:44:53 +02:00
bastien 72bcb900d0 install_deps: also clear BLOSC cmake variables.
Otherwise when switching from self-built to distro packages for OpenVDB,
Blosc CMake cached variables break building...
2020-08-25 19:54:22 +02:00
Sybren A. Stüvel 948e080fc5 Silence `-Wmaybe-uninitialized` warning on GCC/Linux
Add `-Wno-maybe-uninitialized` option to `CMAKE_CXX_FLAGS_RELEASE` and
`CMAKE_CXX_FLAGS_RELWITHDEBINFO` variables on GCC/Linux.

In Release builds GCC's `-Wmaybe-uninitialized` warning is unreliable,
and thus causes noise that can drown out other warnings. These warnings
are now silenced in release mode builds.a

Debug builds seem fine, so flags for debug builds are not touched by
this commit.

No functional changes.

Reviewed By: Sergey

Differential Revision: https://developer.blender.org/D8615
2020-08-20 16:12:28 +02:00
Sergey Sharybin 400ab19702 Build deps: Enable SSE optimization for FFmpeg
The description is self-explanatory: enable SSE optimizations in the
FFmpeg library. They were disabled from the very beginning of the
dependency builder, possibly due to portability concerns.

FFmpeg does perform runtime check for available CPU microarchitectures,
so the codecs will still run on older hardware, but they will run way
faster on newer hardware.

For example, re-encoding 3405 2560x1376 frames on Xeon E5-2699 V4 CPU
went down from 313sec to 210.

Differential Revision: https://developer.blender.org/D8594
2020-08-18 11:17:26 +02:00
Ray Molenkamp 2c61c3d733 deps_builder: Fix boost::python linking release python library
By default boost::python in debug configuration links the release
python libraries. Which leads to loading issues with the produced
modules in a debug blender (which does use the debug python libs)

Bjam has an option to switch this to the debug libraries but when
you switch that on it changes the library names for *all* boost
libraries, even ones that don't have anything to do with python
and even the release libraries.

therefore an alternative way has been chosen and we're dealing
with this by adding a define rather than asking bjam to do it.
2020-08-15 11:06:16 -06:00
Philipp Oeser 24f7f33c25 Merge branch 'blender-v2.90-release' 2020-08-14 10:40:57 +02:00
Ray Molenkamp e691a3a9b7 Deps_builder: Update openvdb to a dynamic library
This patch changes openvdb from a static to a dynamic library.
this is in preparation for enabling pyopenvdb at some point
in the future.

Differential Revision: https://developer.blender.org/D8282

Reviewed by: brecht
2020-08-13 11:42:05 -06:00
Brecht Van Lommel c5519d4b6f Fix T78065: OSL shader compilation fails on macOS 2020-08-13 17:53:48 +02:00
Brecht Van Lommel 6238eabcd4 Merge branch 'blender-v2.90-release' 2020-08-12 18:50:40 +02:00
Brecht Van Lommel 54c2c14921 CMake: clarify that the modules are licensed BSD 3-Clause
Many of these are derived from similar modules in the CMake project, which
have this license.

Fixes T79715
2020-08-12 18:49:16 +02:00
Brecht Van Lommel 655091297f Fix T79736: install_deps.sh failing to download OpenImageIO due to wrong version 2020-08-12 18:38:29 +02:00
Ray Molenkamp 6a95f05d65 deps_builder: Optionally build boost::python
This this adds the option of building boost::python
in the libs builder, in preparation for future
dependencies that require it (ie pyopenvdb)

disabled by default, can be enabled with the
`WITH_BOOST_PYTHON` cmake option.

Differential Revision: https://developer.blender.org/D8212

Reviewed by: brecht
2020-08-12 10:17:38 -06:00
Ray Molenkamp df12e6778a deps_builder: Fix python build on windows
Issue introduced in the boost.cmake cleanup in
rB5c563cd903ddceebfffbb1e86af2b406bbb2c457
2020-08-12 08:40:24 -06:00
Ray Molenkamp b0dc413f4d deps_builder: Cleanup options.cmake for windows
We no longer build the thumbnail dll in the builder
and these variables are no longer used.
2020-08-12 08:26:42 -06:00
Ray Molenkamp 5c563cd903 deps_builder: Cleanup boost.cmake on windows
There were some remnants from previous boost::python support
and support for building 32 bit libs on windows, neither are
needed currently.
2020-08-12 08:21:37 -06:00
Bastien Montagne 20ca7122f0 install_deps: update some libs, and various improvements/fixes.
This commits:
- Updates some libraries to latest officially supported versions:
** Numpy: 1.17.5
** OCIO: 1.1.1
** OIIO: 2.1.15
** OSL: 1.10.10
** OIDN: 1.2.1

- Re-enables some distro packages (like OSL, OIIO, OCIO...).

- Add missing 'CMake cleanup commands' for generated CMake update
  command, for Embree, OIDN and OpenXR.

- Generalizes using min/max versions of accepted libraries, if no
  package can be found in specified range then it is built from sources.

The later point should help keeping things a bit in better conditions,
although current maximal accepted versions are somewhat arbitrary guess
currently.
2020-08-11 18:11:45 +02:00
Sebastian Parborg be83b8f456 Cleanup: CMake warnings related to "find package" modules
Fix package name missmatch in a few module files. IE "ALEMBIC" was
defined in the file but the find_package commands used "Alembic"

Some modules state that they set and use the _LIBRARY variable but the
do in fact not do this. Removed these comments from those files.
2020-08-07 16:56:38 +02:00
Brecht Van Lommel 93d8373edb Merge branch 'blender-v2.90-release' 2020-08-04 17:14:06 +02:00
Brecht Van Lommel a4a814a180 Fix buildbot macOS packaging error after recent changes 2020-08-04 17:13:09 +02:00
Brecht Van Lommel 89baafc8e2 Merge branch 'blender-v2.90-release' 2020-08-04 16:57:50 +02:00
Brecht Van Lommel 9538e38704 Fix buildbot packaging error after recent changes 2020-08-04 16:54:18 +02:00
Brecht Van Lommel 21c31885ed Merge branch 'blender-v2.90-release' 2020-08-04 16:39:03 +02:00
Brecht Van Lommel 16c7b6a7fe Buildbot: make code signing of packages optional with --codesign parameter
This is in preparation of doing builds per commit that will not be code signed.

Ref D8438

Differential Revision: https://developer.blender.org/D8451
2020-08-04 15:44:41 +02:00
Bastien Montagne e17befe368 Install_deps: add libgmp as default dependency.
This is a common system library, no need for fancy building this time...

Part of D8384.
2020-08-03 10:44:07 +02:00
Bastien Montagne 977f89ef2d Merge branch 'blender-v2.90-release' 2020-08-03 10:30:59 +02:00
Bastien Montagne fe70605a2a Building: Add ceres to Ninja's heavy jobs pool.
Some files in this library require more than 1.5Gb to build, so they
also belong to the 'heavy' pool.
2020-08-03 10:30:33 +02:00
Campbell Barton 83d6290800 Cleanup: remove trailing space, newlines at eof 2020-08-03 15:14:02 +10:00
Ray Molenkamp 83f8223543 Deps builder: Add support for building GMP
Required for the new boolean code, disabled by default
until all platforms have landed the libs and the boolean
code actually lands in master.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8384
2020-07-31 09:34:26 -06:00
Brecht Van Lommel 81caec8c60 Fix blender_test runner build on the buildbot on Linux and macOS
Add our own copy of the gtest discovery scripts from CMake a few reasons:
* Use the very latest version which supports PRE_TEST for Windows
* Fix usage of [] symbols in file paths that fail with the zsh shell
* Disable asan leak checker when discovering tests

This means Windows also no longer requires the very latest CMake 3.18.
2020-07-31 14:41:13 +02:00
Ray Molenkamp 44928a2a8f Fix: Blender_test not working on windows.
This bumps the minimum requirement for cmake from 3.10 to 3.18 on windows
if `WITH_GTESTS` is enabled.

Reviewed By: sergey brecht sybren campbellbarton

Differential Revision: https://developer.blender.org/D8405
2020-07-30 13:18:05 -06:00
Ankit Meel 27d50d6f67 Enable header auto-complete suggestions in Xcode
Description of `USER_HEADER_SEARCH_PATHS` build setting:
"
This is a list of paths to folders to be searched by the compiler
for included or imported user header files (those headers listed
in quotes) when compiling C, Objective-C, C++, or Objective-C++.
Paths are delimited by whitespace, so any paths with spaces in
them need to be properly quoted. See Always Search User Paths
(Deprecated) (ALWAYS_SEARCH_USER_PATHS) for more details
on how this setting is used. If the compiler doesn't support the
concept of user headers, then the search paths are prepended to
the any existing header search paths defined in Header Search
Paths (HEADER_SEARCH_PATHS).
"

http://help.apple.com/xcode/mac/current/#/itcaec37c2a6

Xcode doesn't use `HEADER_SEARCH_PATHS` for auto-complete. Only the
header files in the same directory as the current file are suggested.

CMake as of now correctly sets `SYSTEM_HEADER_SEARCH_PATHS` and lumps the
rest in `HEADER_SEARCH_PATHS`.  The standard way is to use
`USER_HEADER_SEARCH_PATHS` & `SYSTEM_HEADER_SEARCH_PATHS` and let
`HEADER_SEARCH_PATHS` be used as a fallback for compilers which do not
distinguish between `<*.h>` and `"*.h"` syntax.

So set `USER_HEADER_SEARCH_PATHS` to the include paths specified
in the `CMakeLists.txt` files of all targets.
2020-07-30 21:13:26 +05:30
Sybren A. Stüvel a5b2aa96e4 CMake: reject older GCC version when using precompiled Linux libraries
In the situation where the precompiled libraries are used on Linux +
GCC, a version of GCC older than 9.3 is guaranteed to cause problems.

This just implents a fatal error message when we know it doesn't make
sense to continue. We could do more checks and add some warnings, but
it's very likely that these will be ignored amongst the other noise.

Reviewed By: sergey, brecht

Differential Revision: https://developer.blender.org/D8396
2020-07-27 17:29:13 +02:00
Patrick Mours a9644c812f Cycles: Use pre-compiled PTX kernel for older generation when no matching one is found
This patch changes the discovery of pre-compiled kernels, to look for any PTX, even if
it does not match the current architecture version exactly. It works because the driver can
JIT-compile PTX generated for architectures less than or equal to the current one.
This e.g. makes it possible to render on a new GPU architecture even if no pre-compiled
binary kernel was distributed for it as part of the Blender installation.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8332
2020-07-20 19:25:27 +02:00
Ray Molenkamp 99fda4d31e deps builder: Fix typo in windows harvesting 2020-07-16 07:22:52 -06:00
Brecht Van Lommel 66b48ad8fb Fix git tag warning when running make update after recent changes 2020-07-16 14:26:37 +02:00
Sybren A. Stüvel 56aa5b0d8c T73268: Link C/C++ unit tests into single executable
This commit introduces a new way to build unit tests. It is now possible
for each module to generate its own test library. The tests in these
libraries are then bundled into a single executable.

The test executable can be run with `ctest`. Even though the tests
reside in a single executable, they are still exposed as individual
tests to `ctest`, and thus can be selected via its `-R` argument.

Not yet ported tests still build & run as before.

The following rules apply:

- Test code should reside in the same directory as the code under test.
- Tests that target functionality in `somefile.{c,cc}` should reside in
  `somefile_test.cc`.
- The namespace for tests is the `tests` sub-namespace of the code under
  test. For example, tests for `blender::bke` should be in
  `blender::bke:tests`.
- The test files should be listed in the module's `CMakeLists.txt` in a
  `blender_add_test_lib()` call. See the `blenkernel` module for an
  example.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7649
2020-07-16 12:58:49 +02:00
Stefan Werner 9715ad5aca macOS: Support arm64 architecture.
Enabling all `make deps` dependencies with the exception of Embree and OIDN.
After that, Blender can be compiled on an Apple Silicon Mac just like on any
Intel based Mac. There are still compiler warnings that need to be
investigated and there are probably a couple of bug still to be discovered
and to be fixed.

Most patches to the dependencies are simple and are about disabling SSE and
setting the proper architecture to compiile for. Notable exception is Python,
where I back ported a yet to be accepted PR for upstream Python:
https://github.com/python/cpython/pull/21249

Cross compiling or buliding a Universal Binary is not supported yet.
The minimum macOS target version for x86_64 remains at 10.13, the target
for arm64 is 11.00.

Differential Revision: https://developer.blender.org/D8236
2020-07-16 09:37:38 +02:00
Brecht Van Lommel 5ecefc6a07 Build: make update support for git tags
Previously it only picked the appropriate version with the
blender-vX.XX-release branches.
2020-07-13 15:54:12 +02:00