[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12072] branches/cloth/blender: Add WITH_BF_OPENMP for openmp usage, untested on msvc

Daniel Genrich daniel.genrich at gmx.net
Mon Sep 17 21:32:15 CEST 2007


Revision: 12072
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12072
Author:   genscher
Date:     2007-09-17 21:32:15 +0200 (Mon, 17 Sep 2007)

Log Message:
-----------
Add WITH_BF_OPENMP for openmp usage, untested on msvc

Modified Paths:
--------------
    branches/cloth/blender/SConstruct
    branches/cloth/blender/intern/elbeem/SConscript
    branches/cloth/blender/source/blender/blenkernel/BKE_blender.h
    branches/cloth/blender/tools/btools.py

Modified: branches/cloth/blender/SConstruct
===================================================================
--- branches/cloth/blender/SConstruct	2007-09-17 18:24:53 UTC (rev 12071)
+++ branches/cloth/blender/SConstruct	2007-09-17 19:32:15 UTC (rev 12072)
@@ -176,6 +176,18 @@
     env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
     env['CCFLAGS'].append('-DDISABLE_ELBEEM')
 
+if env['WITH_BF_OPENMP'] == 1:
+	if env['OURPLATFORM']=='win32-vc':
+		env['PLATFORM_LINKFLAGS'].append('/openmp')
+		env['CCFLAGS'].append('/openmp')
+		env['CPPFLAGS'].append('/openmp')
+		env['CXXFLAGS'].append('/openmp')
+	else:
+		env['PLATFORM_LINKFLAGS'].append('-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'):

Modified: branches/cloth/blender/intern/elbeem/SConscript
===================================================================
--- branches/cloth/blender/intern/elbeem/SConscript	2007-09-17 18:24:53 UTC (rev 12071)
+++ branches/cloth/blender/intern/elbeem/SConscript	2007-09-17 19:32:15 UTC (rev 12072)
@@ -5,7 +5,11 @@
 
 sources = env.Glob('intern/*.cpp')
 
-defs = 'NOGUI ELBEEM_BLENDER=1'
+defs = ' NOGUI ELBEEM_BLENDER=1'
+
+if env['WITH_BF_OPENMP'] == 1:
+    defs += ' PARALLEL'
+
 if env['OURPLATFORM']=='win32-vc':
     defs += ' USE_MSVC6FIXES'
 incs = env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC'] + ' ' +env['BF_SDL_INC']

Modified: branches/cloth/blender/source/blender/blenkernel/BKE_blender.h
===================================================================
--- branches/cloth/blender/source/blender/blenkernel/BKE_blender.h	2007-09-17 18:24:53 UTC (rev 12071)
+++ branches/cloth/blender/source/blender/blenkernel/BKE_blender.h	2007-09-17 19:32:15 UTC (rev 12072)
@@ -44,7 +44,7 @@
 struct MemFile;
 
 #define BLENDER_VERSION			245
-#define BLENDER_SUBVERSION		0
+#define BLENDER_SUBVERSION		1
 
 #define BLENDER_MINVERSION		240
 #define BLENDER_MINSUBVERSION	0

Modified: branches/cloth/blender/tools/btools.py
===================================================================
--- branches/cloth/blender/tools/btools.py	2007-09-17 18:24:53 UTC (rev 12071)
+++ branches/cloth/blender/tools/btools.py	2007-09-17 19:32:15 UTC (rev 12072)
@@ -55,8 +55,9 @@
             'BF_VERSE_INCLUDE',
             'VERSE_BUILD_BINARY', 'VERSE_BUILD_DIR', 'VERSE_REGEN_PROTO',
             'BF_TWEAK_MODE',
-            'WITHOUT_BF_INSTALL'
-            ]
+            'WITHOUT_BF_INSTALL',
+            'WITH_BF_OPENMP'
+	    ]
 
     arg_list = ['BF_DEBUG', 'BF_QUIET', 'BF_CROSS', 'BF_UPDATE',
             'BF_INSTALLDIR', 'BF_TOOLSET', 'BF_BINNAME',
@@ -247,6 +248,8 @@
         ('BF_FREETYPE_LIB', 'Freetype library', ''),
         ('BF_FREETYPE_LIBPATH', 'Freetype library path', ''),
 
+	(BoolOption('WITH_BF_OPENMP', 'Use OpenMP if true', 'false')),
+
         (BoolOption('WITH_BF_QUICKTIME', 'Use QuickTime if true', 'false')),
         ('BF_QUICKTIME', 'QuickTime base path', ''),
         ('BF_QUICKTIME_INC', 'QuickTime include path', ''),





More information about the Bf-blender-cvs mailing list