diff options
author | Jens Verwiebe <info@jensverwiebe.de> | 2013-11-07 19:05:59 +0400 |
---|---|---|
committer | Jens Verwiebe <info@jensverwiebe.de> | 2013-11-07 19:05:59 +0400 |
commit | e572a433a8fefa4e45318c545b48eb8c82bb97ef (patch) | |
tree | 39494855474e198933730ad6e15fe9a48f16bfe5 /SConstruct | |
parent | 67162306a7cb4e0ca4b38bec6f77de4f13c21571 (diff) |
OSX/scons: make gcc version detection more futureproof
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct index 4607df20ad1..f5165606700 100644 --- a/SConstruct +++ b/SConstruct @@ -409,10 +409,12 @@ 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'][:-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 |