Commit Graph

965 Commits

Author SHA1 Message Date
Lawrence D'Oliveiro
554eca1c28 Avoid UUOC in install_deps.sh
The file ##build_files/build_environment/install_deps.sh## contains the following line:

  THREADS=`cat /proc/cpuinfo | grep processor | wc -l`

The command within the backticks is a [[ http://catb.org/jargon/html/U/UUOC.html | Useless Use Of Cat ]].

A more compact way of writing the same thing (saving two subprocesses) is

  THREADS=`grep -c processor /proc/cpuinfo`

or (using POSIX-preferred command-substitution parentheses instead of backticks)

  THREADS=$(grep -c processor /proc/cpuinfo)

But the most compact, and least Linux-specific, way is to use the ##nproc##(1) command from the [[ http://www.gnu.org/software/coreutils/manual/html_node/nproc-invocation.html | GNU coreutils package ]]:

  THREADS=$(nproc)

Reviewers: sergey, mont29

Reviewed by: mont29

Differential Revision: https://developer.blender.org/D255
2014-02-22 14:31:43 +01:00
Sergey Sharybin
28f3cc3eb7 Fixes for buildinfo hash/branch detection
Branch name and hash didn't work properly when having disconnected
HEAD or when having current HEAD below upstream.
2014-02-20 21:43:30 +06: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
Martijn Berger
ace071f99e prepare 32bit build msvc2013 scons/buildbot 2014-02-18 23:15:40 +01:00
Jens Verwiebe
c987bcc416 OSX: more futurework for clang-openmp:
- moved assumed location of omp lib to blender libs
- prepared libiomp5 to link out of the box with cmake
- changed according in scons
- introduced a local var C_VENDOR, cause Apple clang 3.4 may not include omp support yet
- added a linklibs for msgfmt ( may not be needed for other than OSX )
2014-02-18 17:18:35 +01:00
Martijn Berger
727ef0dfde win32 MSVC 2013 add scons support 2014-02-13 19:15:43 +01:00
Dan Eicher
6ad9941c74 Add the date to the CPack rpm package version
Updating rpms built from 'make package' has issues using the git hash since it isn't in a set order like svn commits, this lets it use the date to determine if the rpm is newer than the installed version.

Also updates the license text.
2014-02-12 13:45:36 -07:00
Jens Verwiebe
a84bcea070 OSX/scons: allow for compiling with clang-openmp-3.4
See: http://clang-omp.github.io
+ fix a longstanding bad include in darwin-config
2014-02-09 18:03:13 +01:00
Bastien Montagne
e2e9c51900 Fix T38370: Ubuntu 14.04 opencolorio segfaults blender on parsing colormanagement/config.ocio
Ubuntu hack: add a --libyaml-cpp-ver parameter, to try to force installing a given version of this lib...
(only for DEB-like distro, I dare hope Trusty (!) is the only affected distro.
Not happy at all to have such things here, this is actually an Ubuntu bug, but will have to live with it I guess.
2014-02-07 15:24:17 +01:00
Lawrence D'Oliveiro
cb0a5adc56 SCons: cleaner determination of 32-bit/64-bit builds
Try not to be x86-centric, remove unneeded blenderdeps variable.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D240
2014-02-04 19:01:10 +01:00
Bastien Montagne
142228433a Cleanup: remove completely all-static option, just too complex to support in modern linuxes! 2014-02-04 16:52:33 +01:00
Bastien Montagne
2ebffd01da Deb-like distro may use either jack or jack2, add support for this. 2014-02-04 16:52:33 +01:00
Lawrence D'Oliveiro
eeefbbcc78 SCons: Simplify Endian determination
Differential Revision: https://developer.blender.org/D252
2014-01-31 13:20:26 +01:00
f70d966047 Scons: refactor cycles kernel code to avoid building the AVX kernel with
compilers that don't support it.

CMake still needs to updated to work the same for consistency, but this should
fix the OS X buildbot at least.
2014-01-28 23:02:06 +01:00
Campbell Barton
c2da706a36 Code cleanup: remove references to svn and code style 2014-01-28 23:01:22 +11:00
60287e23b5 Buildbot OS X: compile with clang instead of GCC.
This should solve the missing -mavx option for Cycles, and also give better
performance since GCC 4.2 is now 5 years old already.
2014-01-27 17:16:10 +01:00
Campbell Barton
8f2eec5a15 Build System: icon files now depend on UI_icons.h for CMake
Now changing UI_icons.h causes icons to be re-generated, without this
adding a new icon wouldn't automatically get into the generated PNG.
2014-01-27 17:25:29 +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
Bastien Montagne
90283843e3 install_deps.sh: Fix output conf for CMake (specifying root dirs for OIIO/OCIO is not needed when you use default path, but mandatory otherwise, simpler to always give them).
Spotted by dingto on IRC, thanks!
2014-01-18 16:03:23 +01:00
Jens Verwiebe
74ae93d1cd Scons: Fix cycles OpenCL kernelcompile by distributing util_half.h 2014-01-17 00:33:32 +01:00
Campbell Barton
88f65fdddb CMake: add missing dependency for icon target 2014-01-17 01:50:33 +11:00
Thomas Dinges
5d88f7c7db Cycles: Build SSE41 kernel per default, remove build option. This hopefully also fixes some compile errors on various systems. 2014-01-14 22:04:32 +01:00
Bastien Montagne
839ddfbb65 Fix for rBec81feab6649: better to search for versionned libs first, else it can use your system ones instead of those built by install_deps! 2014-01-14 21:52:17 +01:00
IRIE Shinsuke
ec81feab66 CMake: Fix libname handling of OpenEXR 2.1. The library built with Autotools was not found.
Weird library names having version suffix (e.g. libIex-2_1.so) are used only
when the OpenEXR was built with CMake.  Building the library with the Autotools
doesn't add the version suffix.
2014-01-15 04:43:31 +09:00
Campbell Barton
4c9a3a53bd UI Icons: store icons in git as uncompressed pixmaps (D196)
this allows for updating icons without committing a new PNG each time
(which is inefficient with git). The data files are converted into a
PNG at builds time and used just as they were before.
2014-01-14 00:14:03 +11:00
Martijn Berger
62c8bae872 Added scons option to actually build the sse41 kernel. CMake already has it 2014-01-06 21:38:56 +01:00
Campbell Barton
a335137607 CMake: fix for OpenEXRConfig.h not being found on some Linux systems 2014-01-04 13:16:41 +11:00
Campbell Barton
fa4260ced9 Code Cleanup: use cmake case matching other find modules 2014-01-04 12:46:18 +11:00
Martijn Berger
cb4d32cba3 one more msvc 2013 change 2013-12-30 22:25:56 +01:00
Martijn Berger
5d3adafcbb Buildbot SCons MSVC 2013 packing also requires something extra 2013-12-29 19:56:03 +01:00
Martijn Berger
8c4d40d0e5 MSVC 2013 buildbot changes 2013-12-29 17:43:31 +01:00
Martijn Berger
21d587d9fc Added option to have a seperate environment for executing nvcc
This can be used to compiler cuda kernels with Visual Studio 2010 while
the rest of blender is compiled with MSVC 12.0 / 2013
2013-12-29 14:57:21 +01:00
Martijn Berger
42044a96e4 Basic scons support for building with Visual Studio 2013 although full MSVC 2013 support still needs more work in scons itself 2013-12-27 19:46:55 +01:00
Bastien Montagne
61ce7a26f3 Raise Python version to 3.3.3. 2013-12-19 22:44:51 +01:00
Bastien Montagne
163df7ff43 Better handling of new libnames of OpenEXR 2.1 (same solution as one used in OIIO/OSL source). 2013-12-16 21:16:02 +01:00
Bastien Montagne
740c7e677b Fix typo in previous own commit (thanks to _FrnchFrgg_ for noticing this!). 2013-12-15 15:53:50 +01:00
Bastien Montagne
05fe9a435a Make libyaml-cpp-dev not-breaking case for deb-like distros, and colors for messages! 2013-12-14 15:52:15 +01:00
Bastien Montagne
400fc9f86f Raise llvm min version to 3.3, looks like this is needed for OSL nowadays... 2013-12-12 17:24:41 +01:00
Bastien Montagne
b7ac2b1467 Add libxml2, libyaml-cpp and libtinyxml to default dependencies (always-installed packages), looks like they are needed... 2013-12-12 11:08:56 +01:00
Bastien Montagne
05e17242c9 More updates, fixes and cleanup to install_deps.sh.
So, after hours of wild hunt, I think both CMake and Scons builds work again.
There were several small issues hiding here and there, esp. for scons.

*WARNING* the --all-static is currently officially broken (it was already quite useless in fact).
          I’m seriously considering dropping it completely, having a script compiling a chain
          of static libs in a complete working way for *two* different build systems is just
          too much work (static libs are *really* a nightmare at link time).

Builders who want to generate static Blender (to share it e.g.) will have to handle things by hand for now.

Main other points changed:

* Many changes to generated settings for scons (notably, I had to hack around the fact that the short ld -l
  option does not work with lib names like 'Iex-2_1', which is not that surprising).
* Opencollada remains the only lib built statically (can't get it to build dyn currently).
* All other libs, even ILMBase ones, are now fully dynamic ones.
* Some general cleanup with CMake definitions of built libs.
* Git-libs do not clone again and again the repo anymore!
2013-12-11 22:12:09 +01:00
Bastien Montagne
9bca996c5e Minor fix to generated settings for scons (affected ilmbase/openexr). 2013-12-10 22:28:02 +01:00
Campbell Barton
a7ac6481ef CMake: report messages as status (else ccmake treats like an error) 2013-12-10 13:18:46 +11:00
Bastien Montagne
bac86a0825 Update install_deps.sh to OIIO 1.39 and OSL 1.4.0.
Note that I also updated OpenEXR to 2.1.0 (and updated our CMake openexr module as well).

Users will have to update their build settings as told by the script (also in BUILD_NOTES.txt generated file)!

Note I removed all ugly patches from this script, we are currently using custom git repo for OpenEXR/OIIO/OSL,
hopefully we will soon be able to use vanillia code from official repos!
2013-12-08 18:29:54 +01:00
Jens Verwiebe
901ebbd94a Scons: as requested by Ideasman, make MACOSX_COMPILER -> C_COMPILER_ID,
leave env set for OSX exclusive for now”
2013-12-08 15:35:21 +01:00
Jens Verwiebe
c167d7b79a OSX/scons: Introduce a new env var 'MACOSX_COMPILER'
This is needed to resolve the real used compiler from the compatibility shim’S or symlinks.
Also set the real CCVERSION as scons CCVERSION would only read the default one, which
is not useful for OSX
2013-12-06 17:06:51 +01:00
Jens Verwiebe
df2f604af2 OSX/scons: fix misdesigned version detection of compiler ( todo: do with submodule ), fix a compiler warning with clang < 5” 2013-12-04 23:15:29 +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
Sergey Sharybin
6a6c7b10de Correction to previous commit
Better just use "strip", to be sure \r\n is also stripped.
This also corresponds to what happens with popen() results.
2013-11-29 22:41:01 +06:00
Jens Verwiebe
f359b931f9 Better removal of \n in hash with rstrip 2013-11-29 17:27:29 +01:00