Scons: as requested by Ideasman, make MACOSX_COMPILER -> C_COMPILER_ID,

leave env set for OSX exclusive for now”
This commit is contained in:
Jens Verwiebe
2013-12-08 15:35:06 +01:00
parent 38adc8a91f
commit 901ebbd94a
3 changed files with 9 additions and 9 deletions

View File

@@ -306,9 +306,9 @@ if env['OURPLATFORM']=='darwin':
env['CCVERSION'] = ver.group(0)
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['MACOSX_COMPILER'] = frontend.group(0)
env['C_COMPILER_ID'] = frontend.group(0)
print B.bc.OKGREEN + "Using Compiler: " + B.bc.ENDC + env['MACOSX_COMPILER'] + '-' + env['CCVERSION']
print B.bc.OKGREEN + "Using Compiler: " + B.bc.ENDC + env['C_COMPILER_ID'] + '-' + env['CCVERSION']
cmd = 'sw_vers -productVersion'
MAC_CUR_VER=cmd_res=commands.getoutput(cmd)
@@ -387,7 +387,7 @@ if env['OURPLATFORM']=='darwin':
#Intel Macs are CoreDuo and Up
if env['MACOSX_ARCHITECTURE'] == 'i386' or env['MACOSX_ARCHITECTURE'] == 'x86_64':
env['REL_CCFLAGS'] = env['REL_CCFLAGS']+['-msse','-msse2','-msse3']
if env['MACOSX_COMPILER'] != 'clang' or (env['MACOSX_COMPILER'] == 'clang' and env['CCVERSION'] >= '5.0'):
if env['C_COMPILER_ID'] != 'clang' or (env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '5.0'):
env['REL_CCFLAGS'] = env['REL_CCFLAGS']+['-ftree-vectorize'] # clang xcode 4 does not accept flag
else:
env['CCFLAGS'] = env['CCFLAGS']+['-fno-strict-aliasing']
@@ -396,7 +396,7 @@ if env['OURPLATFORM']=='darwin':
if env['MACOSX_ARCHITECTURE'] == 'x86_64':
env['REL_CCFLAGS'] = env['REL_CCFLAGS']+['-mssse3']
if env['MACOSX_COMPILER'] == 'clang' and env['CCVERSION'] >= '5.0':
if env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '5.0':
env['CCFLAGS'].append('-ftemplate-depth=1024') # only valid for clang bundled with xcode 5
# 3DconnexionClient.framework, optionally install
@@ -424,7 +424,7 @@ 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['MACOSX_COMPILER'] == 'gcc' and env['CCVERSION'] >= '4.6.1': # strip down to version string if any
if env['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.6.1': # strip down to version string if any
env['WITH_BF_OPENMP'] = 1 # multithreading for fluids, cloth, sculpt and smoke
print B.bc.OKGREEN + "Using OpenMP"
else:
@@ -434,7 +434,7 @@ if env['OURPLATFORM']=='darwin':
if env['WITH_BF_CYCLES_OSL'] == 1:
OSX_OSL_LIBPATH = Dir(env.subst(env['BF_OSL_LIBPATH'])).abspath
# we need 2 variants of passing the oslexec with the force_load option, string and list type atm
if env['MACOSX_COMPILER'] == 'gcc' and env['CCVERSION'] >= '4.8': # strip down to version string if any
if env['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.8': # strip down to version string if any
env.Append(LINKFLAGS=['-L'+OSX_OSL_LIBPATH,'-loslcomp','-loslexec','-loslquery'])
else:
env.Append(LINKFLAGS=['-L'+OSX_OSL_LIBPATH,'-loslcomp','-force_load '+ OSX_OSL_LIBPATH +'/liboslexec.a','-loslquery'])