From df2f604af27b16d06a54034ea5692f87537eee88 Mon Sep 17 00:00:00 2001 From: Jens Verwiebe Date: Wed, 4 Dec 2013 23:15:29 +0100 Subject: =?UTF-8?q?OSX/scons:=20fix=20misdesigned=20version=20detection=20?= =?UTF-8?q?of=20compiler=20(=20todo:=20do=20with=20submodule=20),=20fix=20?= =?UTF-8?q?a=20compiler=20warning=20with=20clang=20<=205=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SConstruct | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 197a51f813e..d95811a40d3 100644 --- a/SConstruct +++ b/SConstruct @@ -373,7 +373,9 @@ 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']+['-ftree-vectorize','-msse','-msse2','-msse3'] + env['REL_CCFLAGS'] = env['REL_CCFLAGS']+['-msse','-msse2','-msse3'] + if env['XCODE_CUR_VER'] >= '5': + env['REL_CCFLAGS'] = env['REL_CCFLAGS']+['-ftree-vectorize'] # clang xcode 4 does not accept flag else: env['CCFLAGS'] = env['CCFLAGS']+['-fno-strict-aliasing'] @@ -409,7 +411,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['CC'].split('/')[len(env['CC'].split('/'))-1][4:] >= '4.6.1': + if env['CC'].split('/')[len(env['CC'].split('/'))-1].strip('llvm - gcc clang') >= '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: @@ -419,7 +421,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['CC'].split('/')[len(env['CC'].split('/'))-1][4:] >= '4.8': + if env['CC'].split('/')[len(env['CC'].split('/'))-1].strip('llvm - gcc clang') >= '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']) -- cgit v1.2.3