Commit Graph

2136 Commits

Author SHA1 Message Date
Ray Molenkamp
3c231c3810 cmake/msvc: Add ninja support for precompiled headers
Ninja was unable to see the dependency between the cpp
that generated the pch and the compile units that used
it. Explicitly managing this now makes precompiled headers
work with both msvc and clang, with both msbuild and ninja
based generators.
2019-06-06 08:26:15 -06:00
Ray Molenkamp
d8ec8a0272 Fix: Build error with ninja on windows
Ninja has issues detecting the implicit dependency on the
precompiled header output for freestyle. Disabled ninja
support for now until a proper solution can be found.
2019-06-06 07:19:58 -06:00
Campbell Barton
f0ff593d97 Cleanup: indentation
Also add comment to `FRS_precomp.h`.
2019-06-06 14:50:12 +10:00
Ray Molenkamp
9c76b2c3b6 Freestyle: Use precompiled headers with MSVC.
This brings down the build time for freestyle with MSVC from a
minute to 10-20 seconds.

vs2019 bf_freestyle debug   before: 60464 ms  after: 11028 ms
vs2019 bf_freestyle release before: 56984 ms  after: 20526 ms

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

Reviewed By: brecht , sergey
2019-06-05 19:05:16 -06:00
Campbell Barton
0f6ac1883d CMake: pass link deps to library targets with INTERFACE
Introduced since removing BLENDER_SORTED_LIBS.

This caused building a library to build all it's dependencies.
2019-06-06 10:16:06 +10:00
Ray Molenkamp
fb4ec706cd make.bat: Support optional paths for make format
make.bat now supports optional parameters to restrict
the formatting to a specific folder. Multiple paths
may be given

example:
make.bat format source/blender/blenkernel source/blender/gpu
2019-06-05 07:30:45 -06:00
Tomoaki Kawada
99de160340 macOS: fix viewport lagging, by using CAMetalLayer instead of NSOpenGLView
On GPUs that support it, we now present OpenGL contents via CAMetalLayer. This
fixes frame skipping issues found in T60043. If the system does not have a Metal
capable GPU, NSOpenGLView will continue to be used.

Patch by Tomoaki Kawada, with some changes by Brecht Van Lommel.

Differential Revision: https://developer.blender.org/D4619
2019-06-02 12:54:46 +02:00
1418eee5f5 macOS: increase minimum required version to 10.11
This is in preparation of an the upcoming fix where we need to use a Metal
layer to avoid performance issue when drawing with OpenGL. Note that we already
only officially support 10.12+, the difference with this change is that Blender
will not start at all on 10.9 and 10.10.
2019-06-02 12:53:41 +02:00
Ray Molenkamp
079c7f918c Cleanup: make.bat remove noge option from help
The noge option has been removed but was still
shown in the help text.
2019-06-01 16:51:31 -06:00
Ray Molenkamp
893467a8e2 make.bat: Add convenience option to disable buildinfo
Optional parameter nobuildinfo turns WITH_BUILDINFO Off
which is helpful when doing development.
2019-06-01 16:49:21 -06:00
Ray Molenkamp
89207df722 cmake: Fix building with clang on windows. 2019-05-27 13:48:40 -06:00
Ray Molenkamp
30f3ffce05 Fix building with ninja on windows
Broken by rB161908157d67ee8bcfa0c26917cccdc40e0c67ea
2019-05-26 09:25:17 -06:00
Ray Molenkamp
161908157d CMake/MSVC: Mark headers in the libdir as system headers.
This marks the headers in the LIBDIR as system headers
and changes the warn to /W0 on msvc versions that support it.

This resolves some warnings we would had to completely
repress otherwise.
2019-05-25 12:13:06 -06:00
Ray Molenkamp
db3f3d4d23 make.bat: Add option to only update sources from git.
SVN takes a long time to sync even if there are no updates,
the `code_update` parameter gives the option opt out of the
SVN updates.

This is a developer option, people just wanting to build
blender and not do any development are highly recommended
to keep using the `update` method.
2019-05-18 10:34:33 -06:00
Ray Molenkamp
164fafdcb0 make.bat: add option for enabling the OpenGL based tests. 2019-05-13 14:08:27 -06:00
Bastien Montagne
0d43d0bcab CMake: Add support of Ninja's pools to ease building on limited amount of RAM.
Many modern computers support a lot of threads (parrallel building
jobs), but are somewhat restricted in memory, when some building jobs
can require several GB each.

Ninja builder has pools, which extend the usual `-j X` make
parallelizing option, by allowing to specify different numbers of
parallel jobs for different targets.

This commit defines three pools, one for linking, one for usual compile,
and one for compiling some 'heavy' cpp libs, when a single file can
require GB of RAM in full debug builds.

Simply enabling WITH_NINJA_POOL_JOBS will try to set default sensible
values for those three pools based on your machine specifications, you
can then tweak further the values of NINJA_MAX_NUM_PARALLEL_ settings,
if you like.

On my system (8 cores, 16GB RAM), it allows to build a full debug with
all ASAN options build with roughly 7GB of RAM used at most, pretty much
as quickly as without that option (which would require up to 11GB of
available RAM at some points).

Review task: D4780.
2019-05-08 11:54:17 +02:00
Ray Molenkamp
33df4b78d0 make.bat: remove --expand-tabs from "make format" on windows.
following the change on linux.
2019-04-20 13:10:30 -06:00
Maruf Sarker
713f961727 Fix Embree link error after recent cmake changes
Differential Revision: https://developer.blender.org/D4704
2019-04-18 14:28:37 +02:00
Sergey Sharybin
3bc73c1b61 Merge branch 'blender2.7' 2019-04-18 11:57:44 +02:00
Sergey Sharybin
cc9528d3c8 Buildbot: Attempt to fix wrong branch in buildinfo
For some reason the buildinfo header was not re-generated. The root
reason is not really clear to me, so simply remove the header similar
to the CMake cache.
2019-04-18 11:52:34 +02:00
Ray Molenkamp
b46245470f cmake: Fix python linker issues on windows.
Recent cmake work made the debug build link both python37.dll and python37_d.dll
2019-04-17 13:26:02 -06:00
Campbell Barton
3076d95ba4 Cleanup: use 2 space indentation for CMake 2019-04-17 06:35:54 +02:00
Campbell Barton
53e3fcdce4 Cleanup: use 2 space indentation for shell scripts
Already used by install_deps.sh
2019-04-17 06:08:01 +02:00
Sergey Sharybin
2a891842af Clang-format: Speed up detection of clang-format
Don't construct the full build environment, following
feedback from Ray.
2019-04-16 17:10:02 +02:00
Campbell Barton
65aebd0c11 GNUmakefile: move clang format utility
Makes more sense to place in 'utils_maintenance'.
2019-04-16 16:49:32 +02:00
Sergey Sharybin
fc32f98bbc Initial support of make format for Windows
There are couple of caviats currently:

- The script requires system-wide Python 3 available in the current
  search PATH as python.exe.

  This will get addressed soon by distributing unpacked Python binary
  in our libraries.

- Since the libraries folder is to be known, this requires to have
  MSVC detected. Not too bad, since formatting is still way slower
  than detection, but still doesn't feel ideal.
2019-04-16 15:41:32 +02:00
Campbell Barton
31c2e69d49 CMake: remove BLENDER_SORTED_LIBS
Use CMake's target_link_libraries instead of manually maintaining
library dependencies in a single list.

In practice adding new libraries often ended up being guess-work,
now each library lists the libraries it uses.

This was used for the game player executable so libraries
could optionally link to stubs.

If we need this functionality it can be done using target-properties
as described in T46725.
2019-04-16 12:36:44 +02:00
Campbell Barton
813e470eac CMake: cleanup, arg rename, add definitions last 2019-04-16 06:15:18 +02:00
bb6b7dd4ad CMake: re-order openvdb/osl linking
Needed for building without sorted libs.
2019-04-16 06:10:00 +02:00
Campbell Barton
0a90b8bbcf CMake: resolve issue building without sorted libs
Linking empty libs gave an error.
2019-04-15 06:42:24 +02:00
Campbell Barton
47adab4f99 CMake: prepare for BLENDER_SORTED_LIBS removal
No functional change, this adds LIB definition and args to cmake files.
Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS'
since there are many platforms/configurations that could break when
changing linking order.

Manually add and enable WITHOUT_SORTED_LIBS to try building
without sorted libs (currently fails since all variables are empty).
This check will eventually be removed.

See T46725.
2019-04-14 15:37:24 +02:00
Benjamin Schmithüsen
4bad4bfc6a glTF: add Draco shared library for mesh compression.
Draco is added as a library under extern/ and builds a shared library that is
installed into the Python site-packages. This is then loaded by the glTF add-on
to do mesh compression.

Differential Revision: https://developer.blender.org/D4501
2019-04-11 12:04:53 +02:00
Bastien Montagne
f9e0836147 Fix T63347: No longer supported disable-ffserver option in install_deps script.
FFMPEG removed ffserver and that option alltogether three years ago.
2019-04-10 10:19:25 +02:00
Martin Felke
acc20b117d fix for freetype download link and llvm/clang header harvesting 2019-04-03 18:51:42 +02:00
Ray Molenkamp
e2d5ccf598 deps_builder : copy llvm headers to lib folder.
Were not needed previously, but the functions branch needs them.
2019-04-03 06:57:16 -06:00
Sergey Sharybin
1d365374e8 Merge branch 'blender2.7' 2019-04-02 17:51:44 +02:00
cefc058dd8 Build environment: update comment about required packages. 2019-03-29 00:39:19 +01:00
Sergey Sharybin
a74b571dde Merge branch 'blender2.7' 2019-03-25 11:23:00 +01:00
Stephen Hassard
ede1ca0b3f Change remaining FTP server URIs to HTTP(s)
Most of the source tarballs are retrieved via http, but a few remain
that are still downloaded via ftp. This causes some pain with corporate
firewalls, so moving the last two URIs to http helps ease the build process.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4192
2019-03-25 11:19:14 +01:00
Bastien Montagne
13839860d4 Merge branch 'blender2.7' 2019-03-25 11:05:03 +01:00
Bastien Montagne
d46cb486ed Include blosc, embree and opencollada into BUILD_NOTES.txt file.
For custom path selected during 'install_deps.sh' using '--source'/'--install', paths for blosc, embree and opencollada are not printed/inclued into BUILD_NOTES.txt file.
As '/opt/lib/<package>' paths are hardcoded into CMakes's Find* modules, this error is not noticeable, but for custom paths it is.
This patch includes those fixes/prints for those packages.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D4574
2019-03-25 11:04:26 +01:00
Ray Molenkamp
c0f96855e4 Fix T57580: Update windows installer package to have the GPL3 as EULA. 2019-03-21 21:25:20 -06:00
Bastien Montagne
19dc7f7fdf Install_deps: add clang-format packages.
Even though that one is not really useful just to build Blender, we can
as well explicitely include it here, since all 'default' Blender builds
will include full clang/llvm stack anyway (for Cycles and deps)...
2019-03-21 14:12:30 +01:00
e691929686 Merge branch 'blender2.7' 2019-03-17 12:54:19 +01:00
9d2397c710 Cleanup: remove unused buildbot code. 2019-03-17 12:01:19 +01:00
0676badb80 Fix Windows 32bit buildbot trying to use CUDA, should be disabled. 2019-03-17 12:01:19 +01:00
Campbell Barton
0c10374faf CMake: disable jemalloc when building as a Python module 2019-03-16 13:06:47 +11:00
bc8bd87dff Merge branch 'blender2.7' 2019-03-15 18:31:48 +01:00
65d95879f7 Cycles: upgrade to CUDA 10.1 as the one officially supported version.
This version fixes various bugs, and there is no need anymore to use both
9.1 and 10.0 for different cards.

There is a bug related to WITH_CYCLES_CUBIN_COMPILER and bump mapping in the
regression tests, so that remains disabled same as it was for CUDA 10.0.

Fix T59286: CUDA bake failing on some cards.
Fix T56858: CUDA 9.2 and 10 issues.
2019-03-15 16:52:28 +01:00
2d4a4fa0c1 Merge branch 'blender2.7' 2019-03-13 18:37:09 +01:00