Commit Graph

1078 Commits

Author SHA1 Message Date
Campbell Barton 751874d6bf CMake: remove OSX version lookup table
This assumed the OSX SDK version matched the OSX version, which isn't always true.

Also problematic for maintenance and would make building older Blender versions on OSX fail.

Passing in pre-defined OSX_SYSTEM is also supported,
if you have multiple and want to select one.
2016-03-10 17:59:54 +11:00
Sergey Sharybin a47bfe7d40 Experimental option to build Blender with C11 support
It'll be nice to eventually go C11/C++11 by default, but for until
then it's kinda handy to be able to build locally with C11 support,

Reviewers: mont29, campbellbarton

Reviewed By: mont29, campbellbarton

Differential Revision: https://developer.blender.org/D1752
2016-03-03 11:34:18 +05:00
Campbell Barton 0b13989307 CMake: show error on missing LIBDIR early on
Previously CMake would show many messages about missing libs before checking for a missing LIBDIR.
Now show the error immediately and exit.

Also allow for custom LIBDIR on OSX.
2016-02-26 13:45:24 +11:00
Campbell Barton 1a7b9ce006 CMake: check for minimum MSVC version
Needed since older versions are unsupported (giving cryptic errors).
2016-02-25 07:31:44 +11:00
Sergey Sharybin 6472b98a9c Link windows builds against Blosc when OpenVDB is enabled
OpenVDB is compiled with Blosc support, meaning we should pass Blosc to
a linker now.

Unfortunately, the Blosc has compiled-in crt and pthread library, which
still screws up linking.
2016-02-24 15:51:26 +01:00
Sergey Sharybin f1088bd9e1 CMake: Ignore paranoid MSVC linker warnings 2016-02-20 14:06:09 +05:00
Martijn Berger 4e35131609 Mac OS X Openvdb, add blosc support.
even if WITH_OPENVDB_BLOSC is off openvdb still contains 1 reference to snappy so we link with it always
2016-02-19 02:24:16 -08:00
Sergey Sharybin 9e81222525 CMake: New dependency graph requires either Boost or C++11 2016-02-19 10:18:59 +01:00
Martijn Berger 4a7b09c4ea Windows MSVC allow building with openvdb / tbb 2016-02-10 13:59:04 +01:00
Martijn Berger 715410c2fd CMake OpenVDB support on OS X
Reviewers: kevindietrich, sergey

Differential Revision: https://developer.blender.org/D1773
2016-02-06 04:26:57 -08:00
Campbell Barton 9ab7482657 Imbuf: remove libredcode
D1751, remove this library since its quite a specific - only supports an older version of this codec.

Also ffmpeg has added support for recent versions of the codec.
2016-02-03 18:39:37 +11:00
Sergey Sharybin ddc9c76e3a CMake: Silent Numpy warning on OSX
It is in the archive actually and being installed nicely by the looks of it.
2016-02-01 10:39:16 +01:00
Sergey Sharybin fef53c74b5 CMake: Remove per-module Werror settings
Seems i was the only one who was really up to using it and
i do have gcc-5 finally backported and installed here so
such a fine-tune flags are no longer needed.
2016-01-30 00:04:52 +01:00
Sergey Sharybin a3793f5e0b Cycles: Enable compilation of sm_37 kernels by default
Makes sense to keep support of top-range cards "out of the box".
2016-01-28 11:59:40 +01:00
Sergey Sharybin 1f954649c4 OpenVDB: Get rid of hardcoded TBB variables and enabled for Linux buildbot 2016-01-27 12:27:35 +01:00
Mike Erwin 499bde8105 NDOF: enable 3D mouse support on Mac by default
We used to require the 3Dconnexion driver installed at build-time so
this was turned off.

I reworked the code last year to remove the driver dependency so
there’s no reason not to enable this.
2016-01-26 21:08:57 -05:00
Sergey Sharybin a2b9633791 CMake: Correction in comment in previous commit 2016-01-26 15:42:53 +01:00
Sergey Sharybin cbb498cfb0 CMake: Corrections around disabling Boost
Were some missing dependencies in the checks.
2016-01-26 15:42:35 +01:00
Sergey Sharybin 0095c2dad2 CMake: Keep Schur specializations OFF by default config
Now when doing full build is real easy on all platforms, we can
only keep it enabled for the blender_full configuration.
2016-01-26 11:47:53 +01:00
Kévin Dietrich e9452f909c Implementation of OpenVDB as a possible cache format for smoke
simulations.

This commits implements OpenVDB as an extra cache format in the Point
Cache system for smoke simulations. Compilation with the library is
turned off by default for now, and shall be enabled when the library is
present.

A documentation of its doings is available here: http://
wiki.blender.org/index.php/User:Kevindietrich/OpenVDBSmokeExport.

A guide to compile OpenVDB can be found here (Linux): http://
wiki.blender.org/index.php?title=Dev:Doc/Building_Blender/Linux/
Dependencies_From_Source#OpenVDB

Reviewers: sergey, lukastoenne, brecht, campbellbarton

Reviewed By: brecht, campbellbarton

Subscribers: galenb, Blendify, robocyte, Lapineige, bliblubli,
jtheninja, lukasstockner97, dingto, brecht

Differential Revision: https://developer.blender.org/D1721
2016-01-23 08:39:40 +01:00
Sybren A. Stüvel 306337afea rather then → rather than 2016-01-18 10:20:14 +01:00
Martijn Berger 5a20df6336 Bump boost to 1.60 2016-01-17 12:44:25 +01:00
Campbell Barton dad1cdad13 Revert "Make 'incompatible pointer type' gcc warning an error by default."
This reverts commit b5bd39b518.

This is problematic because it means minor differences in system headers can cause errors
(glew in this case errored for me both with system and Blender's bundled version).

Developers can enable -Werror=* locally for warnings that aren't reliable across different systems.
2016-01-17 13:25:47 +11:00
Bastien Montagne b5bd39b518 Make 'incompatible pointer type' gcc warning an error by default.
This is the second time at least that kind of stuff slips in during one of my refactor,
a mere warning here is really not enough (too easy to miss it)!
2016-01-16 23:00:42 +01:00
Campbell Barton 31375a1b21 Cleanup: stdbool no longer optional, remove checks 2016-01-16 15:38:57 +11:00
Sergey Sharybin 90e827ba66 CMake: De-duplicate checks around unordered maps and shared pointer
Previously several areas were calling TEST_SHARED_PTR_SUPPORT and
TEST_UNORDERED_MAP_SUPPORT which isn't that bad on it's own but
was causing some quite verbose output with same information line
printed multiple times. additionally, what's more worse, define flags
for Ceres were duplicated in main CMakeLists and Ceres's CMakeLists.

Now we've got a single place where checks for those classes are
happening and other areas are simply checking for variables set by
those check macros, keeping CMake output clean and nice.
2016-01-14 12:38:46 +05:00
Sergey Sharybin 2af7637f20 Cycles: Add option to directly link against CUDA libraries
The main purpose of such linking is to make Blender compatible with
NVidia's debuggers and profilers which are doing some LD_PRELOAD
magic to intercept some function calls. Such magic conflicts with
our CUDA wrangler magic and causes segmentation faults.

The option is disabled by default, so there's no affect on any of
artists.

In order to make Blender linked directly against CUDA library use
the WITH_CUDA_DYNLOAD CMake option (it's marked as advanced).
2016-01-14 12:27:22 +05:00
Sergey Sharybin ca0e663c04 CMake: Fix typo in comment 2016-01-05 19:42:16 +05:00
Campbell Barton ad6b7c07dd CMake: remove mingw64_gcc49
Not supported or in working state.
2016-01-05 23:35:14 +11:00
Sergey Sharybin 6fb6a08bf8 Move Ceres to extern/
Even tho it's currently only used by Libmv we might use it for something
else in the future. Plus, it's actually where it logically belongs to.
2016-01-04 19:39:13 +05:00
Sergey Sharybin 0b856dd97e Move GLog/GFlags to extern/
This is where the libraries belongs to actually, they are not only used by
Libmv now, but also by tests and Cycles.
2016-01-04 19:39:13 +05:00
Martijn Berger 5e974a350f Make cycles compile with MSVC 2015 2015-12-29 18:59:23 +01:00
Antony Riakiotakis a36b522869 CMake: make install prefix option irrelevant for MinGW too. 2015-12-27 16:57:43 +01:00
Sergey Sharybin 4415e52009 CMake: Fix errors building by MinGW
Some libraries are nto updated for MinGW hence build system
needs some exceptions for this compiler.
2015-12-26 20:01:17 +05:00
Campbell Barton 46af314bd9 CMake: disable warning 4146
This is warning on noisy (false positives).
2015-12-21 14:54:36 +11:00
Martijn Berger ffc750a4fa Begin to add some MSVC 2015 support 2015-12-10 11:57:13 +01:00
Brecht Van Lommel f9047c3f8c Eigen: fold remaining OpenNL code into intern/eigen.
Differential Revision: https://developer.blender.org/D1662
2015-12-10 01:58:10 +01:00
Sergey Sharybin 27e7c78bae CMake: Use implicit compiler library paths to find OpenMP library
Was lost since the original patch sent to Cambo, didn't notice the failure before
because had it applied locally.

Without this flag certain configuration wouldn't fins libgomp.
2015-12-03 15:34:41 +05:00
Sergey Sharybin 956bd92a60 Buildbot: Initial work to move linux build environment to CMake
This is so called "seems to work in dry tests" commit which is aimed to switch
linux release environment to CMake.

Some notes:

- There's no special handle of libstdc++, but it wasn't really static for quite
  some time in SCons configuration and nobody really complained.

- It was quite tricky to get OpenMP linked statically with just using some
  configuration so we went ahead and added a special option to CMake now which is
  only exist on Linux and advertised as shouldn't be used.

- Packing is happening manually in slave_pack.py. This is because we have to add
  some really special files to the archive (mesa libraries for example) which we
  can't really handle from CMake/CPack in a nice generic way.

  Don't think it's bad approach, at least crappynness is localized and it's not
  _that_ crappy anyway.

- Windows buildbot should keep working, but needs doublechecing. It's just a
  build folder changed, but you never know what it might imply.

- Some further tweaks are likely needed to ensure all builders are working.

Thanks Campbell for assistance in this patch!
2015-12-02 18:11:58 +05:00
Campbell Barton 5680ac911b missed last commit 2015-11-27 18:00:02 +11:00
Campbell Barton 2fa1f60d8e CMake/SCons: set Python to 3.5 2015-11-27 17:26:08 +11:00
Martijn Berger e8b3a14dfb OSX bump python to 3.5 2015-11-24 23:18:31 +01:00
Brecht Van Lommel e556287a3b CMake: enable -std=gnu99 for clang and icc. 2015-11-23 18:22:53 +01:00
Campbell Barton 4fe413a419 CMake: use -Wshadow warning for C source
C source now builds without shadowing, enable with GCC by default.
2015-11-23 17:43:55 +11:00
Campbell Barton b9e0fe2003 CMake: check GNU compiler before using extension
Minor edit, don't assume non-msvc compilers are gcc/gnu compatible.
2015-11-23 08:31:29 +11:00
Brecht Van Lommel 4ff0126e89 C99 is now the C standard for all our C code.
The main new feature is mixed variable declarations and code, which can help
reduce uninitialized variables or accidental variable reuse.

Due to incomplete C99 support in VS 2013, variable length arrays are not
supported, BLI_array_alloca must still be used. The header <tgmath.h> is also
not supported.

Differential Revision: https://developer.blender.org/D1631
2015-11-22 22:31:22 +01:00
Martijn Berger bc1d1aed80 windows / msvc bump to python 3.5 2015-11-15 11:21:26 +01:00
Campbell Barton 497c35aa78 CMake: don't overwrite C/C++ flags for MSVC
Wasn't possible to define custom build flags.

This does change some of the build flags,
as far as we can tell they aren't important (see D1615).
2015-11-11 22:57:28 +11:00
Stephen Kelly 92f059774d CMake: remove setting of policy CMP0043 to OLD.
CMake 3.0 ignores the suffixed COMPILE_DEFINITIONS_<CONFIG> variants if policy
CMP0043 is NEW, preferring instead to consume the unsuffixed COMPILE_DEFINITONS
property and evaluate generator expressions in it.

Setting the policy to OLD causes CMake 3.0 to not ignore those properties.

Use the suffixed properties for compatibility only for CMake versions older
than 3.0 using an explicit version check.  Use the non-suffixed property with
generator expressions otherwise.

These definitions should mostly not be needed at all - CMake already sets
NDEBUG in suffixed CMAKE_CXX_FLAGS_<CONFIG> variables.  The _DEBUG macro is
non-standard, but is used in several places in blender (usually in an OR
combination with the DEBUG macro).  Additionally, blender overwrites (instead
of appending to) the CMAKE_CXX_FLAGS_<CONFIG> variables on WIN32.

Rather than try to fundamentally change how debug-macros are handled in
blender, change the buildsystem to keep the same behavior without requiring the
CMP0043 policy set to OLD.
2015-11-10 06:31:09 +11:00
Campbell Barton cfbbf72d89 Revert "Increase CMake minimum version to 3.0"
This reverts commit ff3cf93405.

Turns out distros only a year old still use CMake 2.8x
2015-11-10 02:53:10 +11:00
Campbell Barton ff3cf93405 Increase CMake minimum version to 3.0
This allows us to use newer features of CMake, and less hassles having to test & support older versions.
2015-11-09 23:37:53 +11:00
Brecht Van Lommel 2a97c17549 CMake: minor message cleanups. 2015-10-10 17:35:30 +02:00
Brecht Van Lommel fccb14b5d2 CMake: detect OS X 10.11 / Xcode 7. 2015-10-04 18:11:08 +02:00
Sergey Sharybin a712459603 CMake: Attempt to fix compilation error on Windows after recent changes 2015-09-17 14:17:00 +05:00
Sergey Sharybin 0b959458ff CMake: Don't modify global CFlags when enabling/disabling OpenJpeg 2015-09-16 19:10:41 +05:00
Thomas Beck 2c5efd5b3f Fix typo in cmake when OpenSubdiv is not found 2015-08-06 11:51:18 +02:00
Sergey Sharybin a474409f0b OpenSubdiv: Enable by default on the supported platforms
This commit makes sure Linux and Windows buildbots are using OpenSubdiv
and also enables OpenSubdiv by default on Windows.

OSX is kept disabled still, this is due to OpenGL restrictions which are
not solved in any way yet.

Linux is defaults to OpenSubdiv disabled because it needs precompiled
library.

The documentation could be found there:

  http://wiki.blender.org/index.php/User:Nazg-gul/OpenSubdiv
2015-08-05 13:29:39 +02:00
Sergey Sharybin 820d191626 OpenSubdiv: Add CMake option to enable -Werror in subsurf code 2015-07-30 10:31:22 +02:00
Jörg Müller 30679179dd Audaspace: fixes for building with Quicktime on Mac. 2015-07-29 16:13:22 +02:00
Jörg Müller a0cbebf404 Audaspace: fixing problems for the merge to master suggested by Campbell and Sergey.
- rename WITH_EXTERNAL_AUDASPACE to WITH_SYSTEM_AUDASPACE.
- rename C/PYAUDASPACE to AUDASPACE_C/PY
- simplifying cmake defines and includes.
- fixing include paths and enabling WITH_SYSTEM_AUDASPACE for windows.
- fixing scons building.
- other minor build system fixes.
2015-07-28 14:01:53 +02:00
Jörg Müller 733073550f Audaspace: use standalone library.
- Added the cmake configuration option WITH_EXTERNAL_AUDASPACE.
- Fixes to build without standalone library as well.
2015-07-28 14:01:52 +02:00
Campbell Barton ad7e3c302e CMake: modify recent platform defaults
Now only disable Jack and NDof on OSX

Also comment main block for platform checks
2015-07-28 17:58:47 +10:00
Campbell Barton 33bac1f401 CMake: use same defaults on all-platforms
Previously Linux had disabled libs that were enabled on other platforms.
Use a reduced feature set on all, since libs such as Jack & OSL aren't totally reliable on Win/OSX.

Keep 'option_defaults_init' since platform maintainers may want to adjust later.
2015-07-28 14:48:12 +10:00
Sergey Sharybin 3d36489672 OpenSubdiv: Commit of OpenSubdiv integration into Blender
This commit contains all the remained parts needed for initial integration of
OpenSubdiv into Blender's subdivision surface code. Includes both GPU and CPU
backends which works in the following way:

- When SubSurf modifier is the last in the modifiers stack then GPU pipeline
  of OpenSubdiv is used, making viewport performance as fast as possible.

  This also requires graphscard with GLSL 1.5 support. If this requirement is
  not met, then no GPU pipeline is used at all.

- If SubSurf is not a last modifier or if DerivesMesh is being evaluated for
  rendering then CPU limit evaluation API from OpenSubdiv is used. This only
  replaces the legacy evaluation code from CCGSubSurf_legacy, but keeps CCG
  structures exactly the same as they used to be for ages now.

This integration is fully covered with ifdef and not enabled by default
because there are several TODOs to be solved first:

- Face varying data interpolation is not really cleanly implemented for GPU
  in OpenSubdiv 3.0. It is also not implemented for limit evaluation API.

  This basically means we'll have really hard time supporting UVs.

- Limit evaluation only works with adaptivly subdivided meshes so far, which
  basically means all the points of CCG are pushed to the limit. This gives
  different result from old code.

- There are some serious optimizations possible on the topology refiner
  creation, which would speed up initial OpenSubdiv mesh creation.

- There are some hardcoded asumptions in the GPU and DerivedMesh areas which
  could be generalized.

  That's something where Antony and Campbell can help, making it so the code
  is structured in a way which is reusable by all planned viewport projects.

- There are also some workarounds in the dependency graph to make sure OpenGL
  buffers are only freed from the main thread.

Those who'll be wanting to make experiments with this code should grab dev
branch (NOT master) from

  https://github.com/Nazg-Gul/OpenSubdiv/tree/dev

There are some patches applied in there which we're working on on getting
into upstream.
2015-07-20 22:29:26 +02:00
Sergey Sharybin 2199a3e38b CMake: Add option to enable -Werror cflag in some areas
It is rather annoying attitude nowadays to use const qualifier all over the
place, including using it for multi-dimensional arrays. This isn't really
supported in GCC prior to version 5.0 because it considers such an arrays
to be a "pointer to a const pointer" which gives implicit casting errors.

It's not possible to disable this particular type of warnings treated as
errors in any GCC version prior to 5.0 as well, meaning currently usage of
-Werror globally in Blender code is not possible at all.

This commit makes it possible to use -Werror in areas which are complaint
with older GCC versions. New advanced CMake options are:

- WITH_COMPOSITOR_WERROR
- WITH_LIBMV_WERROR
- WITH_CYCLES_WERROR
2015-07-18 10:49:51 +02:00
Campbell Barton 752eb64d60 Cleanup: whitespace (CMake) 2015-07-18 18:42:35 +10:00
Sergey Sharybin 7c5dd14689 CMake: Fix indentation around LLVM detection code 2015-07-18 09:40:33 +02:00
Antony Riakiotakis 00808eb39a Make OpenGL debug contexts a flag --debug-gpu instead of a compile time
option.

This makes sense, since contexts get created at runtime, there is little
reason to require recompilation for this.

Only works on linux currently, will be doing more OSs later
2015-07-02 19:30:17 +02:00
Campbell Barton 3bb698646a CMake: minor edits 2015-06-30 22:44:27 +10:00
Bastien Montagne 079b41dd37 Remove WITH_TESTS_PERFORMANCE option.
Performance tests now have their own CMake macro, which ensures they do not get
added to ctest list, so we do not have to bother about them anymore, and can always
build them (when GTests are enabled, of course).
2015-06-29 20:26:58 +02:00
Campbell Barton c03dcc5421 CMake: set advanced var 2015-06-17 14:25:05 +10:00
Campbell Barton 81b37f5e92 CMake: use functions instead of macros
Reduces issues with vars leaking into the parent scope.
2015-06-17 09:38:24 +10:00
Campbell Barton 52997272aa CMake: disable OSL if cycles is disabled 2015-06-14 09:50:33 +10:00
Campbell Barton 1e9348efdc CMake: minor edits to lite config 2015-06-14 09:34:42 +10:00
Campbell Barton e698299e4f CMake: install Python executable when its bundled 2015-05-19 16:44:19 +10:00
Campbell Barton 3d70a04a8a CMake: remove temp assignment, unused vars 2015-05-19 16:44:18 +10:00
Sergey Sharybin bac7353801 Depsgraph: New dependency graph integration commit
This commit integrates the work done so far on the new dependency graph system,
where goal was to replace legacy depsgraph with the new one, supporting loads of
neat features like:

- More granular dependency relation nature, which solves issues with fake cycles
  in the dependencies.

- Move towards all-animatable, by better integration of drivers into the system.

- Lay down some basis for upcoming copy-on-write, overrides and so on.

The new system is living side-by-side with the previous one and disabled by
default, so nothing will become suddenly broken. The way to enable new depsgraph
is to pass `--new-depsgraph` command line argument.

It's a bit early to consider the system production-ready, there are some TODOs
and issues were discovered during the merge period, they'll be addressed ASAP.
But it's important to merge, because it's the only way to attract artists to
really start testing this system.

There are number of assorted documents related on the design of the new system:

* http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents
* http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph

There are also some user-related information online:

* http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/
* http://code.blender.org/2015/03/more-dependency-graph-tricks/

Kudos to everyone who was involved into the project:

- Joshua "Aligorith" Leung -- design specification, initial code
- Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes
- Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the
  project and so
- Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the
  issues and recording/writing documentation.
- Everyone else who i forgot to mention here :)
2015-05-12 16:06:37 +05:00
Martijn Berger 3f04f64eea [cmake] move FindLLVM to its own file 2015-05-06 12:35:48 +02:00
Campbell Barton 7a8170e9c1 CMake: Only consider it INFO is ld.gold is missing 2015-05-04 18:33:37 +10:00
Campbell Barton ca15ffb8ad CMake: use ld.gold linker when available
Gives noticeable speedup linking blender
2015-05-02 22:14:12 +10:00
Sergey Sharybin 1721d47106 CMake: Solve compilation error from path with a space 2015-04-30 12:55:52 +05:00
Campbell Barton eee666583f Use gnu89 for GCC
GCC5 defaults to gnu11, which we may switch to later
but disable for now to prevent accidental use.
2015-04-28 18:59:52 +10:00
Campbell Barton 9576d03f50 CMake: add -Wformat-signedness 2015-04-24 19:11:02 +10:00
Sergey Sharybin 42e427905c CMake: Move performance tests under the cmake option
This way running full sweep of regression tests does not require
waiting for the performance test to finish.
2015-04-20 18:30:26 +05:00
Thomas Dinges 5db143efbb Fix T44449, sm_52 kernel missing in CMake builds. 2015-04-19 22:04:23 +02:00
Sergey Sharybin 6cd82dbf57 CMake: Enable strict flags for C++ 2015-03-27 18:23:31 +05:00
Campbell Barton 3030e2d1cb CMake: tweak recent py module changes
support installing portable builds to CMAKE_INSTALL_PREFIX
2015-03-24 19:09:51 +11:00
Campbell Barton 4560570f8a Fix for building blender as a Python module
Installation didn't work on debian distro's
now install into PYTHON_SITE_PACKAGES (which is detected and can be configured).
2015-03-24 17:06:12 +11:00
Campbell Barton f91850d564 Disable IME for headless builds 2015-03-21 03:02:09 +11:00
Campbell Barton 4b88541d59 CMake: unbundle eigen3
Optionally use systems eigen3 library.

T41989 by @hasufell with edits
2015-03-19 15:41:41 +11:00
Sergey Sharybin 63ea8dd156 Initial compilation support with C++11 featureset enabled
This commit makes some preliminary fixes and tweaks aimed to make blender
compilable with C++11 feature set. This includes:

- Build system attribute to enable C++11 featureset.

  It's for sure default OFF, but easy to enable to have a play around with
  it and make sure all the stuff is compilable before we go C++11 for real.

- Changes in Compositor to use non-named cl_int structure fields.

  This is because __STRICT_ANSI__ is defined by default by GCC and OpenCL
  does not use named fields in this case.

- Changes to TYPE_CHECK() related on lack of typeof() in C++11

  This uses decltype() instead with some trickery to make sure returned type
  is not a reference.

- Changes for auto_ptr in Freestyle

  This actually conditionally switches between auto_ptr and unique_ptr since
  auto_ptr is deprecated in C++11. Seems to be not strictly needed but still
  nice to be ready for such an update anyway/

This all based on changes form depsgraph_refactor branch apart from the weird
changes which were made in order to support MinGW compilation. Those parts of
change would need to be carefully reviewed again after official move to gcc49
in MinGW.

Tested on Linux with GCC-4.7 and Clang-3.5, other platforms are not tested and
likely needs some more tweaks.

Reviewers: campbellbarton, juicyfruit, mont29, lukastoenne, psy-fi, kjym3

Differential Revision: https://developer.blender.org/D1089
2015-03-13 16:47:40 +05:00
Campbell Barton 278871db5b error in last commit 2015-03-13 22:46:15 +11:00
Campbell Barton bb825d02f8 CMake: unbundle LZO library
Patch T41989 by @hasufell
2015-03-13 22:36:01 +11:00
Campbell Barton 1e817cceb0 CMake: rename LLVM_DIRECTORY -> LLVM_ROOT_DIR
Matching convention with all other libs
2015-03-05 15:42:01 +11:00
Campbell Barton acfc0d4a18 CMake: was defaulting to an old LLVM version
Made finding LLVM fail.

only use LLVM_VERSION if set, else set to installed version
2015-03-05 15:42:01 +11:00
Campbell Barton 30d6589069 CMake: mark lib/debug options advanced 2015-03-05 15:42:01 +11:00
Antony Riakiotakis d58a15c0a6 Windows: Add stacktrace support when unhandled exception occurs.
We need to register the exception handler slightly differently here, as
well as adding DbgHelp as a library, but according to docs it should be
supported in recent Windows editions (Win XP included even).

We can try it first and revert if there are issues.
2015-03-03 13:39:15 +01:00
Antony Riakiotakis fed61d50c7 Debug GPU functionality from soc-viewport_fx by Jason Wilkins
patch number D706 with changes:

- WITH_GPU_DEBUG just creates a debug context (and enables the debug messaging
system functions) but leaves the checks we had intact. Old patch
added the debug functionality only if we had the flag on to save some
performance.

Rationale here is that we might not want to recompile blender just to get
the extra information, and having users start blender with a -d flag to
get the extra information is also useful for bug reports. Those checks already
existed and most expensive ones are hidden behind a debug mode check
so performance should not be that bad.

- Did some cleanup of existing functionality:
When things go wrong blender side, just print the error,
don't check for GL errors first.

- Did not port changes needed for GLES to regular glew.h

- Got rid of duplicate or very similar new functionality.

Generally, code is more moving things around/cleanup and should work exactly
as before apart from the debug context, so it's safe to add even now.

It also provides a nice substitute function for glu error descriptions
2015-02-23 13:35:57 +01:00
Campbell Barton ee9ac4e4fc CMake: remove expression in endif(...) 2015-02-19 07:45:59 +11:00
Campbell Barton 54994740bd CMake: indent & missing header 2015-02-19 07:15:55 +11:00
Sybren A. Stüvel 9a10b208ba Ensure CMake finds SDL 2.0
CMake 2.8 doesn't search /usr/include/SDL2, which is the include directory
for SDL 2.x on Ubuntu Linux (and possibly others). This results in SDL 1.2
headers being found when WITH_SDL_DYNLOAD=OFF, and our shipped SDL 2.0
headers when WITH_SDL_DYNLOAD=ON. This patch ensures that in both
cases the correct SDL headers are used.

Reviewers: sergey, campbellbarton

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1112
2015-02-16 09:27:50 +01:00
Sergey Sharybin dde0765de2 CMake: Enable JeMalloc by default
It's really handy to have blender linked against jemalloc because of
much better memory fragmentation handling by that library.

To be noted: if jemalloc library is not found it'll be disabled with
message about that, no compilation error should happen.
2015-02-14 15:13:48 +05:00
Sergey Sharybin 53c4033b5b CMake cleanup: Move OSL detection code into FindOpenShadingLanguage.cmake
Should be no functional changes.
2015-02-10 02:45:59 +05:00
Sergey Sharybin 40f237675f Some tweaks to support upcoming OSL-1.6
Doesn't mean we're 100% ready for the transition, but need to start somewhere
anyway. Changes:

- OSL is no longer supporting cpp and requires usage of Boost Wave.
  So now Wave component of Boost is optionally demanded when looking for the
  Boost libraries if OSL is enabled.

  Only did this for Linux, MSVC seems already using Wave. Not sure about OSX.

- Because of the same reason OSL should be moved prior Boost for linker.

- Whole archive trick makes it so linking fails with duplicated symbols, so
  removed it for the new OSL. Didn't see issues with this so far.

- Added some code to check OSL version on Linux. Would need to move all that
  to FindOpenShadingLanguage.cmake which we can get from Cycles standalone
  repository.

  So in theory no affect on current stup would be made at all.

- Added some tweaks to buildbot files. It now seems to be happy with the new
  OSL libraries, but again, those tweaks are not in action yet.

All this was tested on Linux only. Win/OSX might still need some tweaks to
support new OSL.

P.S. This doesn't mean we're pushing OSL update yet, just making some
preliminary tweaks to avoid entropy of PITA when we'll actually want to
switch.
2015-02-06 14:57:32 +05:00
Antony Riakiotakis 529ca92975 MinGW still uses SDL1 - will need to change this of course but no need
to keep compilation broken for now
2015-02-03 12:51:12 +01:00
Martijn Berger d7ad64cc5e Bump OpenEXR to 2.2 for windows MSVC 2013 2015-02-02 19:44:49 +01:00
Sergey Sharybin d687625ad8 Correct path to mingw64 libs so some minimal blender subset is possible to be compiled with older gcc 2015-01-27 19:29:22 +05:00
Sergey Sharybin 90f2febbf4 CMake: Auto-detect path to idiff application in FindOpenImageIO.cmake
Not used at this moment, but will be real soon with new ctests.
2015-01-22 15:53:15 +05:00
Antony Riakiotakis 5685c43586 Select appropriate folder for MinGW-w64 gcc 4.9 2015-01-16 15:04:02 +02:00
Campbell Barton 73955e2566 Fix for GTest 2015-01-09 23:33:02 +11:00
Sergey Sharybin e0a809fb1d Cycles: Fix compilation error when OIIO is compiled with external PugiXML parser
Basic idea is to check whether OIIO is compiled with embedded PugiXML parser
and if so use PugiXML from OIIO, otherwise find a standalone PugiXML library.
2015-01-01 01:31:07 +05:00
Sergey Sharybin 4497b6ac84 Cycles: Synchronize changes with standalone repository
This changes were done in original commit of the standalone Cycles repository
and needed here for easier patch synchronization.
2015-01-01 01:31:07 +05:00
Severin e81d077c85 Input Method Editor (IME) support for text buttons
Original patch by @random (D765) with some minor work done by @campbell
and me.

At this place, I'd like call out a number of people who were involved and
deserve a big "Thank you!":
* At the first place @randon who developed and submitted the patch
* The Blendercn community which helped a lot with testing - espacially
* @yuzukyo, @leon_cheung and @kjym3
* @campbellbarton, @mont29 and @sergey for their help and advises during
* review
* @ton who realized the importance of this early on and asked me for
* reviewing

We are still not finished, as this is only the first part of the
implementaion, but there's more to come!
2014-12-07 00:58:17 +01:00
Sergey Sharybin 9ae458362a Cycles: Enable logging by default
Default configuration already includes libmv and glog, so all
the dependencies are met. And logging is nice to have anyway.

This wouldn't give any slowdown, because all the logging is
silenced unless '--debug-cycles', plus no logging is done
from the speed critical code.
2014-12-03 22:46:56 +05:00
Campbell Barton 8bc84e10f5 CMake: correct own error using undefined var 2014-11-26 13:26:26 +01:00
Campbell Barton 62e9435dbc CMake: disable OSL if its not found 2014-11-21 13:07:59 +01:00
Sergey Sharybin 82d2718c8f Switch to SDL2 on OSX 2014-11-19 19:41:41 +01:00
Sergey Sharybin 80d1d624d3 Support dynamic loading of SDL libraries
This is mainly to address old issue when one need to have SDL library installed
in order to use our official builds. Some hip distros already installs SDL,
but it's not quite the same across all the variety of the distros.

We also now switching to SDL-2.0, most of the distros have it in repositories
already, so it shouldn't be huge deal to install it if needed.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D878
2014-11-17 17:43:18 +05:00
Jens Verwiebe ed52706d35 Just 2 comments cleaned 2014-11-16 17:12:49 +01:00
Jens Verwiebe fa821a969e OSX/buildsystems: unify openmp handling by changing iomp5 id to @loader_path/../Resources/lib/libiomp5.dylib
This makes install_name_tool usage obsolete here and also assures cmake builds can be codesigned.
IMPORTANT: update lib (darwin-9.x.universal/openmp)
2014-11-16 17:03:44 +01:00
Campbell Barton f283f57432 CMake: cleanup, namespace & unused vars
also add macro 'print_all_vars()', if(0)'d - debugging only.
2014-11-16 13:04:10 +01:00
Sergey Sharybin f7371dca82 Code cleanup: Spelling 2014-11-16 02:11:41 +05:00
Campbell Barton eb515f4dc8 CMake: cleanup, use find_package for pthreads 2014-11-15 16:46:30 +01:00
Martijn Berger 3da0ee287c cmake / windows cleanup 2014-11-15 14:36:25 +01:00
Martijn Berger 9ce9725211 Cmake windows, removing more redundant things 2014-11-15 12:42:21 +01:00
Martijn Berger 237bd11bc5 Cmake windows/msvc minor cleanup 2014-11-15 12:12:19 +01:00
Martijn Berger c8a9764987 Cmake add installation of redistributables for msvc 2013 2014-11-14 10:49:01 +01:00
Campbell Barton bf63e348a2 CMake: disable some build option defaults T42569
This commit disables some lesser used dependencies
for Linux/Unix systems by default.

Run: `make full` to enabled options used in release build.
2014-11-14 00:10:24 +01:00
Campbell Barton 3967d1caba CMake: remove deprecated mudflap option 2014-11-13 19:43:15 +01:00
Martijn Berger 15a7a5a08c CMake buildbot change upload should work now
CPack generating NSIS and WiX installers should also work
2014-11-13 17:09:47 +01:00
Martijn Berger 96ca64629d Windows (MSVC2013) move to SDL2 2014-11-13 16:23:27 +01:00
Campbell Barton 9ebe44bc9c Cleanup: cmake 2014-11-13 15:30:32 +01:00
Sergey Sharybin f82f1513e0 Booleans: Boost is no longer a dependency for Carve
SCons is currently broken on my laptop, so can't test if it works for sure,
so please do tests of that.
2014-11-13 18:26:21 +05:00
Antony Riakiotakis 4d35ecc3bb Only do the portable fix on linux - thanks to Martijn Berger for
noticing!
2014-11-13 14:10:37 +01:00
Campbell Barton 1eecb1feaf CMake: manpage creation is now optional 2014-11-13 14:07:34 +01:00
Antony Riakiotakis c9f87df47f Correctly support non-portable case 2014-11-13 13:52:20 +01:00
Martijn Berger c932edb578 Fix: T42553 Linux cmake install now also without absolute path's
OS X cmake probably needs more checking.
2014-11-11 21:44:26 +01:00
Martijn Berger 5cce2e1cfe Cmake cleanup
Move compiler warnings for msvc to common compilerwarnings.
2014-11-08 21:17:43 +01:00
Martijn Berger 8f8321bfdb cmake buildfiles Cleanup / Refactor, no functional changes.
Move away from using hardcoded ${target} when calling install() in cmake
2014-11-08 11:32:32 +01:00
Sergey Sharybin 560dd932c2 Don't change global compiler flags when FFmpeg is enabled
It should no be longer needed. If it causes the issues please let me know
to find a more cleaner solution.
2014-10-21 03:22:05 +06:00
Sergey Sharybin 4b8430ae8a CMake: Add a flag to explicitly disable SSE/SSE2 intrinsics
The flag is called WITH_CPU_SSE, it is ON by default so no one should
be affected by the change really.

This should hopefully fix https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763755
2014-10-15 14:53:12 +06:00
Sergey Sharybin 9245e1aeb8 Fix compilation error after recent commit 2014-10-08 04:11:23 +06:00
Jason Wilkins 8d084e8c8f Ghost Context Refactor
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
2014-10-07 15:47:32 -05:00
Sergey Sharybin 27d660ad20 Cycles: Add support for debug passes
Currently only summed number of traversal steps and intersections used by the
camera ray intersection pass is implemented, but in the future we will support
more debug passes which would help checking what things makes the scene slow.
Example of such extra passes could be number of bounces, time spent on the
shader tree evaluation and so.

Implementation from the Cycles side is pretty much straightforward, could only
mention here that it's a build-time option disabled by default.

From the blender side it's implemented as a PASS_DEBUG with several subtypes
possible. This way we don't need to create an extra DNA pass type for each of
the debug passes, saving us a bits.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D813
2014-10-04 19:00:26 +06:00
Sergey Sharybin 178f8400ee Libmv: Add an option to disable schur specializations build-time
This way folks with few ram or those who wants to hack into Ceres
code might compile Blender much faster.
2014-10-02 13:01:34 +06:00
Sergey Sharybin 13d8671a1a Cycles: Add support of Glog logging
This commit makes it possible to use Glog library for the debug logging.
For now only possible when using CMake and in order to use the logging
the WITH_CYCLES_LOGGING configuration variable is to be enabled.

When this option is not enabled or when using Scons there's no difference
in Cycles behavior at all, when using logging and no output to the console
impact is gonna to be minimal.

This is done in order to make it possible to have debug logging persistent
in code (without need to add it when troubleshooting some bug and removing
it afterwards).

For now actual logging is not placed yet, only all the functions needed for
the logging are written and so.
2014-09-25 17:08:32 +06:00
Campbell Barton 8c3daab298 Cleanup: style, spelling 2014-09-18 09:37:49 +10:00
Jens Verwiebe 62893dc398 OSX/cmake: OSX 10.10 must be used with cmake 3.0.0 minimum, older thinks 10.6 is higher than 10.10 :) 2014-09-17 20:42:21 +02:00
Thomas Dinges 73c647622a Fix Cycles Standalone compile. 2014-09-14 17:40:34 +02:00
Jens Verwiebe d939341b65 OSX: Fix cmake3 usage 2014-09-12 14:42:25 +02:00