Commit Graph

939 Commits

Author SHA1 Message Date
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
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 ff3cf93405e63fa367f64412bcfe96b382b24b38.

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
2a97c17549 CMake: minor message cleanups. 2015-10-10 17:35:30 +02:00
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