[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [61194] trunk/blender: OSX/scons: make gcc version detection more futureproof
jens verwiebe
info at jensverwiebe.de
Thu Nov 7 16:06:00 CET 2013
Revision: 61194
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=61194
Author: jensverwiebe
Date: 2013-11-07 15:05:59 +0000 (Thu, 07 Nov 2013)
Log Message:
-----------
OSX/scons: make gcc version detection more futureproof
Modified Paths:
--------------
trunk/blender/SConstruct
trunk/blender/build_files/scons/tools/Blender.py
Modified: trunk/blender/SConstruct
===================================================================
--- trunk/blender/SConstruct 2013-11-07 14:07:13 UTC (rev 61193)
+++ trunk/blender/SConstruct 2013-11-07 15:05:59 UTC (rev 61194)
@@ -409,10 +409,12 @@
#Defaults openMP to true if compiler handles it ( only gcc 4.6.1 and newer )
# if your compiler does not have accurate suffix you may have to enable it by hand !
if env['WITH_BF_OPENMP'] == 1:
- if env['CC'][:-2].endswith('4.6') or env['CC'][:-2].endswith('4.8'):
+ if env['CC'].split('/')[len(env['CC'].split('/'))-1][4:] >= '4.6.1':
env['WITH_BF_OPENMP'] = 1 # multithreading for fluids, cloth, sculpt and smoke
+ print B.bc.OKGREEN + "Using OpenMP"
else:
env['WITH_BF_OPENMP'] = 0
+ print B.bc.OKGREEN + "Disabled OpenMP"
if env['WITH_BF_CYCLES_OSL'] == 1:
OSX_OSL_LIBPATH = Dir(env.subst(env['BF_OSL_LIBPATH'])).abspath
Modified: trunk/blender/build_files/scons/tools/Blender.py
===================================================================
--- trunk/blender/build_files/scons/tools/Blender.py 2013-11-07 14:07:13 UTC (rev 61193)
+++ trunk/blender/build_files/scons/tools/Blender.py 2013-11-07 15:05:59 UTC (rev 61194)
@@ -700,7 +700,8 @@
commands.getoutput(cmd)
cmd = 'find %s/%s.app -name __MACOSX -exec rm -rf {} \;'%(installdir, binary)
commands.getoutput(cmd)
- if env['CC'][:-2].endswith('4.6') or env['CC'][:-2].endswith('4.8'): # for correct errorhandling with gcc 4.6/4.8.x we need the gcc.dylib and gomp.dylib to link, thus distribute in app-bundle
+ if env['CC'].split('/')[len(env['CC'].split('/'))-1][4:] >= '4.6.1': # for correct errorhandling with gcc <= 4.6.1 we need the gcc.dylib and gomp.dylib to link, thus distribute in app-bundle
+ print "Bundling libgcc and libgomp"
cmd = 'mkdir %s/%s.app/Contents/MacOS/lib'%(installdir, binary)
commands.getoutput(cmd)
instname = env['BF_CXX']
More information about the Bf-blender-cvs
mailing list