Commit Graph

1078 Commits

Author SHA1 Message Date
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
Daniel Genrich a7875c7c05 Fix linking error on VC 2013: Update lib names for openexr 2014-08-13 09:14:05 +02:00
Jens Verwiebe 7ae187c5e4 OSX/cmake: allow for llvm dynamic builds too, but prefer static 2014-08-06 12:48:06 +02:00
Jens Verwiebe 86e9f84be7 OSX/cmake: move last commited line to a better place 2014-08-05 20:21:22 +02:00
Jens Verwiebe e4146e6fa3 OSX/cmake: force LLVM_STATIC ON, to fix linking issues 2014-08-05 20:15:44 +02:00
Jason Wilkins b3faabae2f Fixed linking OIIO on Windows. The debug and optimized options need to be before each individual library in a list. 2014-08-03 11:35:39 -05:00
Jens Verwiebe 02b66f8a55 OSX/buildsystem: prepare usage on OSX 10.10 - Yosemite
- important: requires cmake >= 2.8.12 to read minor version right,
aka older cmake rates 10.10 lower than 10.6 for example ! ( sigh )
2014-08-03 12:51:35 +02:00
Martijn Berger bc9bbca41b Move to OIIO 1.4 also for windows x86 2014-08-02 09:59:09 +02:00
Campbell Barton 7b83e3d6d7 CMake: tweak so 2.8.7 and older still work (disable WITH_BUILDINFO) 2014-08-02 03:08:29 +10:00
Martijn Berger f51282fc57 Cmake prefers NOT to ! 2014-08-01 15:18:34 +02:00
Martijn Berger 6d7333a2f5 Fix msvc 2013 / win64 to use new OIIO and llvm and resulting linking
requirements
2014-08-01 14:28:00 +02:00
Bastien Montagne 5e4a97d109 Default LLVM_STATIC to OFF (it's kinda broken currently, gives various linking issues). 2014-07-30 20:31:13 +02:00
Jens Verwiebe f557b477ad OSX/cmake: fix linking utf-functions if llvm is disabled 2014-07-29 19:46:15 +02:00
Campbell Barton 02b6ba8874 CMake: use our template for finding the glew library 2014-07-29 03:43:49 +10:00
Sergey Sharybin c85265b455 Make requests python package to be detected in the same way as numpy
This solves missing requests package reported on the systems where it's
located in dist-packages rather than in site-packages.

To do this there's now a helper macros which handles both requests and
numpy now and could be used for more packages in the future.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D686
2014-07-28 20:53:02 +06:00
Campbell Barton 2d84072ada CMake/MSVC: use '/SAFESEH:NO' linker flag, needed for some systens (D682) 2014-07-27 13:50:21 +10:00
Jens Verwiebe cd59daca53 OSX/cmake: little tweak for last commit 2014-07-26 18:39:45 +02:00
Jens Verwiebe d4dadaea96 OSX/cmake: update buildsys for new osl/llvm/oiio usage, also use osx_locals.map in cmake
- fixes T40887
2014-07-26 18:10:26 +02:00
Campbell Barton 369d96bacc CMake: use a list for PLATFORM_LINKLIBS 2014-07-25 14:35:53 +10:00
Martijn Berger 490da48d78 Selective changes picked from: e01449fa4bb0df252d32a3b98ee1e8f195923d96
Author: Jason Wilkins

Improves cmake's ability to find our libraries on Windows / MSVC 2013
2014-07-15 16:33:05 +02:00
Jens Verwiebe a83c6293f4 OSX/CMAKE: Way better fix for T40887, checks where failing with clang-omp
- found a way to feed just extra flags to the testcompiles
2014-07-08 23:35:04 +02:00
Jens Verwiebe 9605e0bfb6 OSX/CMAKE: extend my former workaround for failing tests with clang-omp to all build types
- this workaround makes sure the breaking -fopenmp is not exposed to testcompiles which use C_FLAGS respective CXX_Flags
- -fopenmp is always added to the CMAKE_C(XX)_FLAGS_<BUILD_TYPE> now
- another way to solve this would be to move the Configure OpenMP part after all line 2366,
but i don’t know if this would be apreciated
2014-07-08 17:03:44 +02:00
Jens Verwiebe ac6b5f2d1d OSX/cmake: more work on T40887 and a tentative fix
- test fail due libiomp5 is not available @ testing time
- must solve this by adding requred flags/includes to tests
- atm release builds are possible with this hack
2014-07-08 00:29:53 +02:00
Campbell Barton ea1f1fe0c2 BLI_string, dont pass unicode to ascii BLI_str_partition functions 2014-07-08 06:06:34 +10:00
Jens Verwiebe aac283966f OSX/cmake: Real fix for T40887, the reason was find_package(OpenMP) silently failing, breaking all other tests following
- tested gcc 4.8.1 works again
- tested clang-omp in libs works again
- i assume atm., if we only use vanilla clang it is the one in darwin libs
2014-07-07 19:20:33 +02:00
Campbell Barton 2e840e56cf CMake: correct include dirs 2014-07-01 09:36:28 +10:00
Jens Verwiebe a71a8be5cf OSX/cmake: Fix T40887 by detecting if we use an Apple compiler, disable omp in this case 2014-06-30 13:37:10 +02:00
Campbell Barton b5982f7130 CMake: attempt to resolve OSX+clang failing with OpenMP 2014-06-29 06:19:51 +10:00
Campbell Barton 52f63da512 MSVC: quiet harmless linker warnings 2014-06-27 19:50:34 +10:00
Sergey Sharybin 72b607ab74 Some WITH_TESTS weer not renamed to WITH_GTEST 2014-06-18 22:28:27 +06:00
Sergey Sharybin 306cbb82ec GTest unit testing framework
Currently covers only small set of functionality.
2014-06-19 02:09:16 +10:00
Campbell Barton 0eb060c7b4 Move tests into tests/ top-level dir 2014-06-18 22:03:46 +10:00
Dalai Felinto b4aa51f8d7 CMake fixup for bd43ac04 as indicated by Campbell Barton 2014-06-13 17:24:19 -03:00
Campbell Barton bd43ac04a5 CMake: quite warnings with 3.0 (without breaking < 3.0 CMakes) 2014-06-11 03:00:57 -03:00
Dalai Felinto a08275c86a Revert "CMake: quiet warnings with 3.0"
This reverts commit da7bdf1b47.

This broke compilation in OSX and some Linux boxes.
Error:  Policy "CMP0043" is not known to this version of CMake

Shall we leave those for after RC (or even 2.71) is out? ;)
2014-06-11 02:39:16 -03:00
Campbell Barton da7bdf1b47 CMake: quiet warnigns with 3.0 2014-06-11 13:46:19 +10:00
Matteo F. Vescovi 9b23d9acec Fix compilation error non non-linux architectures 2014-06-02 16:26:38 +06:00
Campbell Barton b252915b68 CMake/SCons: finish removing MSVC2012 references 2014-05-15 16:16:25 +10:00
Thomas Dinges 2eeab8f191 Windows: Remove support for MSVC 2012 (VC11).
The officially supported compiled is now MSVC 2013, and MSVC 2008 will be faded out slowly over the coming weeks.
2014-05-15 07:50:02 +02:00
Sergey Sharybin 678b3cbb4f Proper fix for CMake files
next time you're deprecating some platform, compiler, feature just either
mail in the ML telling about this or if you're not that lazy poke developers
online whether then can spot issues quick.

Or be ready to pick up stuff being done by the developers your change gives
headache to.
2014-05-06 04:03:45 +06:00
Campbell Barton 4c47a71e55 CMake: Edit recent commit, allow 64bit msvc2008 2014-05-06 06:13:07 +10:00
Campbell Barton 60c5887fe8 CMake: mark vars as advanced 2014-05-06 06:04:29 +10:00
Campbell Barton 9088604811 Drop support for MSVC versions older then 2013 with CMake
We get too many complaints about breakage and we intend to drop older versions soon anyway.
2014-05-06 05:04:25 +10:00
Brecht Van Lommel 741f17f05b Cycles CUDA: make CUDA toolkit 6.0 the official supported version.
This also updates the configurations to build kernels for compute capability
5.0 cards, when using and older CUDA toolkit version this will be skipped.

Also includes tweaks to improve performance with this version:
* Increase max registers on sm_30, sm_35 and sm_50
* No longer use texture storage on sm_30
2014-04-30 16:07:27 +02:00
Campbell Barton b96d531bc9 Python: move to version 3.4x on all platforms 2014-04-30 23:19:16 +10:00
Jens Verwiebe 058bc50799 OSX: tentative fix for D472, ditto creates dirs when needed automatically, also thin out lib. Todo: rather not build the intermediate bins with openmp dependency anyway 2014-04-22 12:27:45 +02:00
Jens Verwiebe cddbe87ae5 OSX/python: update to py 3.4 2014-04-15 14:12:22 +02:00
Sergey Sharybin d0c1b44deb CMake: enable OpenMP for all platforms by default
This is done in SCons and the only reason to disable OpenMP on
Windows was to deal with the express version of compilers.

Now when we are about to switch to msvc2013 by default we can
safely enable OpenMP there since even express version of this
beast supports OpenMP.
2014-04-14 15:38:34 +06:00
Jens Verwiebe 6e9c2d0c55 OSX/cmake: fix a recently reported dependency issue 2014-04-13 18:04:56 +02:00
Antony Riakiotakis 3ab0a4da73 Enable openmp in MinGW-w64 2014-04-07 19:01:19 +03:00
Campbell Barton 617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
Antony Riakiotakis 2702170717 Fix mingw32 compilation 2014-03-30 00:51:30 +02:00
Sergey Sharybin d3a73d0845 Windows: Upgrade FFmpeg from 0.10 to 2.1.4
Fixes T39423: Blender crashes on iv41 encoded videos in thumbnail display mode

Libraries are still being committed to the svn, so compilation might be broken
for a while. Sorry for this, but can't really be avoided.

Also, some typos in scons are possible.
2014-03-27 16:52:59 +06:00
Campbell Barton 2044201a9b CMake: only nag about requests py module once 2014-03-26 07:02:42 +11:00
Juergen Herrmann 645aa96795 Make CMake use Jack debug libraries when compiling a debug build 2014-03-08 18:47:02 +01:00
Juergen Herrmann 8df2d1c6b6 Minor changes to CMakeLists.txt to enable debug builds on VS2013.
Fix for finding LLVM and OSL debug libs.
2014-03-08 18:47:00 +01:00
Campbell Barton 7cb8b6f538 Build system: add cmake option to install requests 2014-03-05 05:40:47 +11:00
Campbell Barton c436c78de1 Build system support for numpy on ms-windows 2014-03-05 00:22:51 +11:00
Campbell Barton 247702986a CMake: add _WIN32_WINNT MSVC define to match scons 2014-02-25 09:56:55 +11:00
Jens Verwiebe 5fb72b7ee5 OSX/Cmake: tentative handling for clang-omp,
set flags hardcoded when used
2014-02-19 21:44:53 +01:00
Campbell Barton a6b87853cb MSVC: add more warnings to match OSX/Linux 2014-02-19 18:05:37 +11:00
Campbell Barton d76bcf98a3 MSVC: improve warnings for scons and cmake
Some int/float conversion warnings were disabled by buildsystems but
re-enabled by BLI_winstuff.h, the warnigns relate to conversions not
considered issues on other systems so better just quiet them.
2014-02-19 17:37:02 +11:00
Jens Verwiebe ad4c12fe01 OSX/CMAKE: make linking and bundling of clang omp lib work,
Cmake will still not find -fopenmp working, so the user must set
WITH_OPENMP and flags manually
2014-02-18 23:38:56 +01:00
Campbell Barton 78bd029bbe MSVC: add errors for BLI_strict_flags.h 2014-02-16 14:50:15 +11:00
Campbell Barton 7c69215933 CMake: disable international if the locale path is empty
This would happen when the submodules weren't initialized
but fail on `make install` with a not very helpful message.
2014-02-16 07:55:28 +11:00
Campbell Barton 004decc1d9 Code cleanup: warnings 2014-02-15 18:21:07 +11:00
Campbell Barton c2da706a36 Code cleanup: remove references to svn and code style 2014-01-28 23:01:22 +11:00
Martijn Berger e5b1498834 patch by Mihai Melinescu: boost hardcoded MSVC12
Updated CMakeLists.txt to account for boost hardcoded locations for VS 2013.

Reviewers: juicyfruit

Differential Revision: https://developer.blender.org/D261
2014-01-27 09:24:44 +01:00
Martijn Berger b46dcafa7a fix building cycles standalone on windows / cmake 2014-01-25 14:20:25 +01:00
Campbell Barton 536800392a Code Cleanup: whitespace 2014-01-24 00:06:09 +11:00
Campbell Barton 7198eee880 Enable XDND on FreeBSD 2014-01-22 01:49:13 +11:00
Thomas Dinges 21264f89ac Cycles: Add a cmake config to easily compile Cycles Standalone.
On Linux/Mac OS X, simply type "make cycles" inside the Blender source directory, to get a standalone build of the engine.

Reviewed by: Brecht
Differential Revision: https://developer.blender.org/D228
2014-01-20 20:44:39 +01:00
Thomas Dinges 8d0055f3c8 CMake: Fix info message for Cycles standalone. 2014-01-18 15:19:49 +01:00
Martijn Berger e1b322b250 find_package(OPENAL) does not play nice with our current library naming nonvention 2013-12-24 13:21:56 +01:00
Brecht Van Lommel 7b97047b8e CMake: attempt to fix Boost detection on Fedora 20, which omits -mt. 2013-12-23 16:53:15 +01:00
Martijn Berger 98ed7fa2db More CMakeLists.txt changes
Summary:
I added a function that adds all libdir/* to  CMAKE_PREFIX_PATH :

further there where two places where if(MSVC) else (mingq) where defined after each other. I moved those into one place.
The things common to MSVC and mingw are now blow the special code as we set libdir and such things depending on compiler.

Besides find_package() working and some cleanups there should be no functional changes

Reviewers: dingto

Reviewed By: dingto

Differential Revision: http://developer.blender.org/D127
2013-12-22 23:24:47 +01:00
Martijn Berger 59fd22e1d8 MSVC 2013 cmake changes
Summary:
I think we should try to use find_package more over just setting the variables it would set.
I added find_package with old behavior as a feedback for boost and openexr

@dingto can you test it in msvc2008 setup ?

Reviewers: dingto

Reviewed By: dingto

CC: dingto, brecht

Differential Revision: http://developer.blender.org/D104
2013-12-20 14:32:51 +01:00
Martijn Berger 85a0c5d4e1 Cycles: network render code updated for latest changes and improved
This actually works somewhat now, although viewport rendering is broken and any
kind of network error or connection failure will kill Blender.

* Experimental WITH_CYCLES_NETWORK cmake option
* Networked Device is shown as an option next to CPU and GPU Compute
* Various updates to work with the latest Cycles code
* Locks and thread safety for RPC calls and tiles
* Refactored pointer mapping code
* Fix error in CPU brand string retrieval code

This includes work by Doug Gale, Martijn Berger and Brecht Van Lommel.

Reviewers: brecht

Differential Revision: http://developer.blender.org/D36
2013-12-07 12:26:58 +01:00
Campbell Barton a10cf5c99e CMake: check CMAKE_C_COMPILER_ID instead of CMAKE_CXX_COMPILER_ID
While its possible to have different C/C++ compilers, we dont support
this at the moment, so just check C compiler ID for now.
2013-12-02 11:36:33 +11:00
Brecht Van Lommel 683093b5c8 CMake/Scons Build: disable explicit linking to libstdc++ on Linux/Unix.
It's not needed, this should happen automatically already, and if you build
against libc++ instead (as on recent FreeBSD), this would give build errors.

Ref T37477.
2013-11-28 18:07:57 +01:00
Campbell Barton 2b4c68b902 CMake Build: option to compile without opennl/superlu. 2013-11-25 15:36:19 +11:00
Campbell Barton d4a11388bf Code Cleanup: warnings 2013-11-22 11:30:40 +11:00
Emanuel Claesson 2479594351 CMake: minor spelling fix for WITH_BOOST
Reviewed By: brecht

Differential Revision: http://developer.blender.org/D26
2013-11-21 17:38:52 +01:00
Jens Verwiebe 02114a6737 OSX/Cmake: workaround for missing OpenGL headers, make sure sdk lookup 2013-11-20 00:39:03 +01:00
Sergey Sharybin 780459e406 Extra unwanted change from the previous commit 2013-11-19 22:25:08 +06:00
Sergey Sharybin 50fbebe0a4 Buildinfo fixes
- Use -M suffix if working tree does have uncommitted
  modifications.
- Local commits are considered local changes as well
2013-11-19 22:22:21 +06:00
Brecht Van Lommel 965c1357c4 CMake: only enable opencollada by default on OS X and Windows, consistent with scons. 2013-11-19 00:43:44 +01:00
Jens Verwiebe 5eb1dba6e0 Cmake: after lot of times commit checking missed including collada, set on by default now 2013-11-18 14:30:38 +01:00
Brecht Van Lommel b764fe58c5 CMake OS X: enable FFMPEG and Quicktime by default to match release and scons. 2013-11-17 15:37:10 +01:00
Jens Verwiebe f8eb006d09 OSX/cmake: rollback ca5bbe0e41 cause OSX versions can have not subversion thus sw_vers -productVersion is not usable for sdk setting 2013-11-15 23:20:38 +01:00
Jens Verwiebe 2b793822ad OSX/cmake: use CMAKE_XCODE_ATTRIBUTE rather than CMAKE_OSX_SYSROOT and set min deployment target to 10.6 now 2013-11-15 20:05:23 +01:00
Jens Verwiebe ca5bbe0e41 OSX/cmake: simplify system-version detection 2013-11-15 19:26:43 +01:00
Brecht Van Lommel 99c5e71397 Quicktime: remove backend with the old quicktime API, and keep the QTKit backend.
This means that if you have WITH_BF_QUICKTIME or WITH_CODEC_QUICKTIME enabled,
it will always use QTKit.

The old backend was only used on 32 bit OS X builds, now 32 and 64 bit builds will
give consistent input/output. On Windows or Linux quicktime isn't being used.
2013-11-06 01:45:15 +00:00
Jens Verwiebe 78d8a14174 OSX: complety remove the cocoa options, definitions and conditionals now 2013-11-05 15:37:59 +00:00
Jens Verwiebe 4e96e04643 OSX/CMake: fix ftemplate condition 2013-10-24 18:46:00 +00:00
Irie Shinsuke 42ac7164e3 Fix for commit r60718. There was a remaining WITH_IMAGE_OPENIMAGEIO in CMakeLists.txt still. 2013-10-13 09:35:54 +00:00
Dalai Felinto 7c2fae19b4 cmake/openimageio - partially reverting #60692
We now have openimageio building when cycles builds or when it's
manually set to build.

(I reverted the _IMAGE_ in the define name because I think the closer
the cmake flags match the defines in the software the better, and there
is no reason to rename all the existent WITH_OPENIMAGEIO references in
CMakeLists.txt - which would be the alternative)
2013-10-12 23:56:21 +00:00
Dalai Felinto acc6998007 adding url for openimageio project in CMake file (OpenEXR and OpenJpeg do the same) 2013-10-11 16:48:42 +00:00
Dalai Felinto 029f4b9767 adding WITH_IMAGE_OPENIMAGEIO and removing the PSD build option
As per Brecht van Lommel's suggestion.
2013-10-11 16:38:04 +00:00
Sergey Sharybin 4bd4037276 Lock-free memory allocator
Release builds will now use lock-free allocator by
default without any internal locks happening.

MemHead is also reduces to as minimum as it's possible.
It still need to be size_t stored in a MemHead in order
to make us keep track on memory we're requesting from
the system, not memory which system is allocating. This
is probably also faster than using a malloc's usable
size function.

Lock-free guarded allocator will say you whether all
the blocks were freed, but wouldn't give you a list
of unfreed blocks list. To have such a list use a
--debug or --debug-memory command line arguments.

Debug builds does have the same behavior as release
builds. This is so tools like valgrind are not
screwed up by guarded allocator as they're currently
are.

--
svn merge -r59941:59942 -r60072:60073 -r60093:60094 \
          -r60095:60096 ^/branches/soc-2013-depsgraph_mt
2013-10-10 11:58:01 +00:00
Dalai Felinto 4abb8fde95 Photoshop PSD support
We now support the combined layer of Photoshop files (stored as layer 0
in the file). This way users can keep their files as multilayer PSD and
Blender always handle them as flat images.

For perfect alpha this requires an OpenImageIO update:
342cc2633f

Photoshop sample files:
https://github.com/OpenImageIO/oiio-images

Brecht has some pending fixes to push for OIIO as well, so we may as
well wait to update our libraries.

What works:
===========
* 8bit images (with or without alpha)
* 16bits images (alpha discarded)
* Photoshop files saved with 'Maximum Compatibility'
* Cycles, Blender internal,  BGE (and player)

Known limitations
(due to OIIO dependency):
=========================
* Images with less than 4 channels show a wrong thumbnail (bug may be in  OIIO)
* Packed images are not supported
* We do not write PSD files.

Note: old Blenders have support for PSD via Quicktime library. But due
to license issues this was discontinued.

Many thanks for Brecht van Lommel for reviewing the patch, suggesting
multiple improvements and to help solving the alpha issue.
2013-10-08 21:17:24 +00:00