Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Verwiebe <info@jensverwiebe.de>2014-02-18 20:18:25 +0400
committerJens Verwiebe <info@jensverwiebe.de>2014-02-18 20:18:35 +0400
commitc987bcc416a340d1e109979b59fc80683279d41f (patch)
tree35f556914a5a4883adc2cb9ac589ffdb764fdd49 /SConstruct
parent7aa86ec243f92cee6f5de040f989fc7779f0e5a1 (diff)
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 )
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct14
1 files changed, 12 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index 0d6bf60faa8..e24638aa15c 100644
--- a/SConstruct
+++ b/SConstruct
@@ -293,8 +293,14 @@ if env['OURPLATFORM']=='darwin':
frontend = re.search(r'gcc', line) or re.search(r'clang', line) or re.search(r'llvm-gcc', line) or re.search(r'icc', line)
if frontend:
env['C_COMPILER_ID'] = frontend.group(0)
+
+ vendor = re.search(r'Apple', line)
+ if vendor:
+ C_VENDOR = vendor.group(0)
+ else:
+ C_VENDOR = 'Open Source'
- print B.bc.OKGREEN + "Using Compiler: " + B.bc.ENDC + env['C_COMPILER_ID'] + '-' + env['CCVERSION']
+ print B.bc.OKGREEN + "Using Compiler: " + B.bc.ENDC + env['C_COMPILER_ID'] + '-' + env['CCVERSION'] + ' ( ' + C_VENDOR + ' )'
cmd = 'sw_vers -productVersion'
MAC_CUR_VER=cmd_res=commands.getoutput(cmd)
@@ -410,9 +416,13 @@ if env['OURPLATFORM']=='darwin':
#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['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.6.1' or env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.4':
+ if env['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.6.1' or env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.4' and C_VENDOR != 'Apple':
env['WITH_BF_OPENMP'] = 1 # multithreading for fluids, cloth, sculpt and smoke
print B.bc.OKGREEN + "Using OpenMP"
+ if env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.4':
+ OSX_OMP_LIBPATH = Dir(env.subst(env['LCGDIR'])).abspath
+ env.Append(BF_PROGRAM_LINKFLAGS=['-L'+OSX_OMP_LIBPATH+'/openmp/lib','-liomp5'])
+ env['CCFLAGS'].append('-I'+OSX_OMP_LIBPATH+'/openmp/include') # include for omp.h
else:
env['WITH_BF_OPENMP'] = 0
print B.bc.OKGREEN + "Disabled OpenMP, not supported by compiler"