Commit Graph

1663 Commits

Author SHA1 Message Date
Ray Molenkamp
d860d23e1a make.bat: cache the vcredist directory.
When run from make.bat the environment is setup correctly and the VCToolsRedistDir environment variable exists, on later invocations of cmake this may no longer be the case and a warning was emitted about the missing runtime. we can't rely on InstallRequiredSystemLibraries.cmake here since it uses the compiler version to figure out the correct location and it doesn't know how to deal with clang.
2018-06-05 07:25:37 -06:00
Ray Molenkamp
88b46a6ce9 make.bat : Fix clang+asan msbuild project generation 2018-06-04 22:35:57 -06:00
Ray Molenkamp
815b1f24fa build_environment: support for msvc2017 and newer cmake.
-expanded build_deps.cmd with 2017 support, it can't locate msvc2017 so needs to be run from developer prompt.
-Newer cmake was unhappy with openal's cmakelists.txt
-collada has warning as error on and errored out on new msvc2017 warnings.
2018-06-02 13:59:56 -06:00
Ray Molenkamp
2ef695fabf build_environment: fix paths in osl.diff 2018-06-02 13:18:22 -06:00
Ray Molenkamp
7c75c2db4f Add Asan support for clang on windows.
This will currently only work for the RelWithDebInfo configuration since asan
does not support the debug crt. for source line information in the reports,
you need a copy of llvm-symbolizer in the blender folder or set the
ASAN_SYMBOLIZER_PATH environment variable to point to it. Currently (as of
6.0.0) llvm-symbolizer does not ship with the binary clang/llvm distribution.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3446
2018-05-31 11:50:30 -06:00
Ray Molenkamp
c0f42a7526 make.bat: fix support for building with just the build tools installed. 2018-05-30 11:11:35 -06:00
Ray Molenkamp
c72a204001 make.bat : fix release build not getting the right settings. 2018-05-28 21:50:59 -06:00
Ray Molenkamp
d6a4b23f8b make.bat : improve error message while detecting the msvc runtime when using clang 2018-05-28 20:07:24 -06:00
Ray Molenkamp
9450792bf2 make.bat : add support for building with ninja and clang together. 2018-05-28 19:56:17 -06:00
Ray Molenkamp
81060ff6b2 Windows: Add support for building with clang.
This commit contains the minimum to make clang build/work with blender, asan and ninja build support is forthcoming

Things to note:

1) Builds and runs, and is able to pass all tests (except for the freestyle_stroke_material.blend test which was broken at that time for all platforms by the looks of it)

2) It's slightly faster than msvc when using cycles. (time in seconds, on an i7-3370)

victor_cpu
	msvc:3099.51
	clang:2796.43

pavillon_barcelona_cpu
	msvc:1872.05
	clang:1827.72

koro_cpu
	msvc:1097.58
	clang:1006.51

fishy_cat_cpu
	msvc:815.37
	clang:722.2

classroom_cpu
	msvc:1705.39
	clang:1575.43

bmw27_cpu
	msvc:552.38
	clang:561.53

barbershop_interior_cpu
	msvc:2134.93
	clang:1922.33

3) clang on windows uses a drop in replacement for the Microsoft cl.exe (takes some of the Microsoft parameters, but not all, and takes some of the clang parameters but not all) and uses ms headers + libraries + linker, so you still need visual studio installed and will use our existing vc14 svn libs.

4) X64 only currently, X86 builds but crashes on startup.

5) Tested with llvm/clang 6.0.0

6) Requires visual studio integration, available at https://github.com/LazyDodo/llvm-vs2017-integration

7) The Microsoft compiler spawns a few copies of cl in parallel to get faster build times, clang doesn't, so the build time is 3-4x slower than with msvc.

8) No openmp support yet. Have not looked at this much, the binary distribution of clang doesn't seem to include it on windows.

9) No ASAN support yet, some of the sanitizers can be made to work, but it was decided to leave support out of this commit.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3304
2018-05-28 14:34:47 -06:00
Ray Molenkamp
7a0699db34 make.bat : Fix builtime.txt being written in the wrong folder. 2018-05-26 19:20:07 -06:00
Ray Molenkamp
c9db7ceff2 make.bat: Add support for building with ninja.
ninja is an alternative to msbuild designed for fast rebuilds. However there is no IDE support, builds only from the command line.

Comparison between msbuild and ninja for a full build, build time in seconds.

Full Clean Build
msbuild     867.5
Ninja       801.2
Difference  -66.3 (-7.6%)

Minor Change
msbuild      43.0
Ninja        14.9
Difference  -28.1 (-64.4%)

No Changes
msbuild      23.0
Ninja         6.1
Difference  -16.9 (-73.5%)
2018-05-25 21:46:42 -06:00
Ray Molenkamp
857e4e04d8 make.bat: refactor make.bat
make.bat was starting to become hard to maintain, this refactors it into separate batch files for each stage of the process.

-Improved detection of msvc2013/2015
-Improved failure handling.
-Added check for working msbuild and C++ compiler
-Added verbose switch to ease trouble shooting.
-Added Check if svn/cmake/git are in the path before using them
-Display the build configuration before asking to download the libraries
-Offer an option to recover an interrupted checkout of the libraries.
-Automatically check out sub-modules in-case they are missing.
2018-05-25 17:57:13 -06:00
Arto Kitula
f197134426 Platform: macOS. Allow building on directory with whitespace (For example /Volumes/External HD/blender-build) 2018-05-11 21:56:13 +03:00
Sergey Sharybin
26dab9c2fe Buildbot: Attempt to link against Blosc statically
Was broken by f1e6838376a.
2018-04-25 12:27:35 +02:00
Stefan Werner
f1e6838376 Build: Added explicit search for Blosc in CMake files. Unix build will now disable WITH_OPENVDB_BLOSC if Blosc libraries cannot be found. 2018-04-24 13:26:54 +02:00
Stefan Werner
0ab30f9e39 Build deps: Fixed TBB build with GCC 6 and newer, turning off dead store elimination. 2018-04-24 13:23:52 +02:00
Stefan Werner
dac8b08f4c Build deps: Fixed capitalisation of CMake modules path for OpenVDB. Before, OpenVDB would always build without BLOSC and TBB support on case-sensitive file systems. 2018-04-24 10:28:38 +02:00
f0edb853be Build: fix make deps using system webp/sndio libs. 2018-04-09 15:08:40 +02:00
Milan Jaros
888a04c7e4 Build: fixes for the Intel compiler versions 2016, 2017, 2018.
Differential Revision: https://developer.blender.org/D3109
2018-04-02 16:39:04 +02:00
Campbell Barton
4ffa05c30b Cleanup: move undo into it's own directory
Split out undo API from ED_util.h into ED_undo.h
2018-04-02 15:07:40 +02:00
Campbell Barton
651b8fb14e Undo: unified undo system w/ linear history
- Use a single undo history for all operations.
- UndoType's are registered and poll the context to check if they
  should be used when performing an undo push.
- Mode switching is used to ensure the state is correct before
  undo data is restored.
- Some undo types accumulate changes (image & text editing)
  others store the state multiple times (with de-duplication).
  This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`.
- Each undo step stores ID datablocks they use with utilities to help
  manage restoring correct ID's.
  Needed since global undo is now mixed with other modes undo.
- Currently performs each undo step when going up/down history
  Previously this wasn't done, making history fail in some cases.
  This can be optimized to skip some combinations of undo steps.

grease-pencil is an exception which has not been updated
since it integrates undo into the draw-session.

See D3113
2018-03-31 20:40:37 +02:00
Arto Kitula
1ebc14064b Build deps: do sndfile patch also on linux platform 2018-03-31 02:15:13 +03:00
Campbell Barton
891c1cfc9a C Logging: use instead of printf for messages
- See `--log` help message for usage.
- Supports enabling categories.
- Color severity.
- Optionally logs to a file.
- Currently use to replace printf calls in wm module.

See D3120 for details.
2018-03-30 18:57:41 +02:00
Thomas Beck
c647c93f63 build_deps: Disable building docs for OIIO
Two issues are fixed with this commit:

1) When we build OIIO (on unixoid build environments) and no /src/doc/oiiotool was present we had no build target for it (which led to a build error). As we don't need docs for OIIO, we disable it now.

2) We specified a var that OIIO does not recognize (was removed upstream a long time ago): ILMBASE_VERSION.
2018-03-30 15:22:40 +02:00
Ray Molenkamp
1b6bf5b75e build_deps: disable hdf5 lib support
we do not ship with hdf5 support for alembic on any of the platforms.
2018-03-28 10:48:52 -06:00
Campbell Barton
c78ebf9f26 Cleanup: split lattice into own library
Was mixed with object functionality.
2018-03-19 15:45:50 +01:00
Campbell Barton
368c581df1 CMake: disable boost for lite builds 2018-03-18 05:10:02 +01:00
Ray Molenkamp
07c90f3a73 build_environment: remove msvc compiler warning from boost.
Even the boost people have given up trying to keep up with the rapid release
of new msvc versions, and have removed the warn for now see: 5ad0730630 (diff-eac863c1d46c77471e54e8818aab7534)
2018-03-17 12:47:17 -06:00
3607b4eb52 Fix LLVM/OSL library detection on macOS to prefer own OSL libraries. 2018-03-04 07:40:21 +01:00
74f3fb746a Fix Clang compiler detection on macOS.
"AppleClang" was not properly detected here. Now make the compiler ID
test a bit less compact but consistent with other code.
2018-03-04 07:39:04 +01:00
Sergey Sharybin
44d45e1af4 Buildbot: Enable Volta deviced CUDA binaries 2018-02-23 14:24:59 +01:00
Sergey Sharybin
e24dee435e Buildbot: Remove master configuration files
Those are stored in blender-buildbot repository now, so having them in
Blender only causes extra work to keep files in sync.
2018-02-23 12:37:05 +01:00
Sergey Sharybin
07f05e294a Buildbot: Disable cuda hack for macOS 2018-02-23 10:55:26 +01:00
Thomas Dinges
2eaf90b305 Cycles: Remove Fermi support from CMake and update runtime checks in device_cuda.cpp.
Fermi code in Cycles kernel and texture system are coming next.
2018-02-17 16:15:07 +01:00
Thomas Dinges
75396edb31 Buildbot: Disable Cycles CUDA support on 32bit, and stop building sm_2x. 2018-02-17 15:49:37 +01:00
Sergey Sharybin
37ce77ba06 Buildbot: Remove usage of deprecated chroot 2018-02-12 17:56:19 +01:00
Campbell Barton
8f9386596f CMake: include missing headers 2018-02-09 13:50:05 +11:00
Sergey Sharybin
e0597baed5 Remove Carve boolean
We've got quite comprehensive BMesh based implementation, which is way easier
for maintenance than abandoned Carve library.

After all the time BMesh implementation was working on the same level of
limitations about manifold meshes and touching edges than Carve. Is better
to focus on maintaining one boolean implementation now.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3050
2018-02-08 15:37:44 +01:00
Ray Molenkamp
36c1122b96 msvc: Use source folder structure for project file.
This patch changes the huge list of projects in visual studio into a nice tree matching the source folder structure. see D2823 for details.

Differential Revision: http://developer.blender.org/D2823
2018-02-03 16:38:27 -07:00
Ray Molenkamp
1a840c3e27 Fix T53951: Copy ms runtime dlls using InstallRequiredSystemLibraries.cmake
Differential Revision: https://developer.blender.org/D3032
2018-02-01 08:26:14 -07:00
Campbell Barton
19b1b45d71 make_quickie: replace os.system w/ subprocess.call 2018-01-26 12:53:42 +11:00
Campbell Barton
0f14c72c29 project_info: replace os.system w/ subprocess.check_call 2018-01-26 12:38:07 +11:00
Campbell Barton
bd5696f857 CMake: store icon names
Without this, adding/removing icons wouldn't force cmake to re-run
making builds fail.

This is the same issue with globbing source code.
2018-01-24 11:32:58 +11:00
Campbell Barton
41e930ac66 Cleanup: CMake whitespace 2018-01-23 17:25:09 +11:00
Ray Molenkamp
a8fc44299b external_libs: Add openjpeg to the mavc lib folders for cycles standalone. 2018-01-17 07:45:05 -07:00
6b3d85fa51 Build: auto detection of libraries built by "make deps" on Linux.
Use the libraries if they exist in ../lib/linux_x86_64 or similar, so
that you can run "make deps && make full" to get a full static build.
Note that install_deps.sh is still the only officially supported way to
build Blender dependencies on Linux, but this may be useful to some.

Differential Revision: https://developer.blender.org/D2980
2018-01-11 22:30:31 +01:00
Bastien Montagne
850f73638c install_deps: Fix OCIO always re-cloning its whole git repository. 2018-01-08 16:34:34 +01:00
Arto Kitula
25418be97e build deps: llvm new website download locations 2018-01-03 14:52:25 +02:00
Bastien Montagne
e84966ac42 nstall_deps: llvm downloads new website location
Patch by Lucas Walter (@lucasw), thanks.

Reviewers: mont29

Reviewed By: mont29

Subscribers: mont29

Differential Revision: https://developer.blender.org/D2983
2018-01-02 15:23:45 +01:00