diff options
author | Jens Verwiebe <info@jensverwiebe.de> | 2014-01-07 01:46:11 +0400 |
---|---|---|
committer | Jens Verwiebe <info@jensverwiebe.de> | 2014-01-07 01:46:20 +0400 |
commit | d21ef02e8f9b548a45746c9f218be2fc5d43ba57 (patch) | |
tree | 4211359fd81eea56f10341977f4341449df29f64 /SConstruct | |
parent | e164a500c83b6c67ad43da3f15c5477280926cc2 (diff) |
OSX/scons: autodetecting sse4.1 capability and set it to used
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index 2e000665aff..cf3eb90f599 100644 --- a/SConstruct +++ b/SConstruct @@ -324,6 +324,9 @@ if env['OURPLATFORM']=='darwin': XCODE_BUNDLE=XCODE_SELECT_PATH[:-19] else: XCODE_BUNDLE=XCODE_SELECT_PATH + # Checking for sse4.1 capability + cmd = 'sysctl hw.optional.sse4_1' # throws 1 if available, else 0 + env['WITH_CYCLES_OPTIMIZED_KERNEL_SSE41'] = commands.getoutput(cmd) print B.bc.OKGREEN + "Detected Xcode version: -- " + B.bc.ENDC + env['XCODE_CUR_VER'] + " --" print B.bc.OKGREEN + "Available SDK's: \n" + B.bc.ENDC + MACOSX_SDK_CHECK.replace('\t', '') @@ -430,6 +433,9 @@ if env['OURPLATFORM']=='darwin': else: env['WITH_BF_OPENMP'] = 0 print B.bc.OKGREEN + "Disabled OpenMP, not supported by compiler" + + if env['WITH_BF_CYCLES'] and env['WITH_CYCLES_OPTIMIZED_KERNEL_SSE41']: + print B.bc.OKGREEN + 'Using Cycles SSE 4.1 option' if env['WITH_BF_CYCLES_OSL'] == 1: OSX_OSL_LIBPATH = Dir(env.subst(env['BF_OSL_LIBPATH'])).abspath |