svn merge -r 12937:13095 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender-staging.git] / SConstruct
index 57d818d578da8c4391bd2a4f17a05ec0827fa48f..adecfcb5dcf15056e285a3c8ac6c448de519359c 100644 (file)
@@ -179,6 +179,18 @@ if env['BF_NO_ELBEEM'] == 1:
     env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
     env['CCFLAGS'].append('-DDISABLE_ELBEEM')
 
+if env['WITH_BF_OPENMP'] == 1:
+       if env['OURPLATFORM']=='win32-vc':
+               env.Append(LINKFLAGS=['/openmp'])
+               env['CCFLAGS'].append('/openmp')
+               env['CPPFLAGS'].append('/openmp')
+               env['CXXFLAGS'].append('/openmp')
+       else:
+               env.Append(LINKFLAGS=['-lgomp'])
+               env['CCFLAGS'].append('-fopenmp')
+               env['CPPFLAGS'].append('-fopenmp')
+               env['CXXFLAGS'].append('-fopenmp')
+
 #check for additional debug libnames
 
 if env.has_key('BF_DEBUG_LIBS'):