[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22940] branches/blender2.5/blender: == SCons ==

Nathan Letwory jesterking at letwory.net
Wed Sep 2 01:32:34 CEST 2009


Revision: 22940
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22940
Author:   jesterking
Date:     2009-09-02 01:32:34 +0200 (Wed, 02 Sep 2009)

Log Message:
-----------
== SCons ==

* Add BGE_CXXFLAGS so we can get rid of hard-coded BGE compiler settings. This was only done for windows, but now linuxers and osxers should be able to set BGE-specific optimisation too. See the windows default configs for example.

Modified Paths:
--------------
    branches/blender2.5/blender/config/win32-vc-config.py
    branches/blender2.5/blender/config/win64-vc-config.py
    branches/blender2.5/blender/source/gameengine/BlenderRoutines/SConscript
    branches/blender2.5/blender/source/gameengine/Converter/SConscript
    branches/blender2.5/blender/source/gameengine/Expressions/SConscript
    branches/blender2.5/blender/source/gameengine/GameLogic/SConscript
    branches/blender2.5/blender/source/gameengine/GamePlayer/common/SConscript
    branches/blender2.5/blender/source/gameengine/GamePlayer/ghost/SConscript
    branches/blender2.5/blender/source/gameengine/Ketsji/KXNetwork/SConscript
    branches/blender2.5/blender/source/gameengine/Ketsji/SConscript
    branches/blender2.5/blender/source/gameengine/Physics/Bullet/SConscript
    branches/blender2.5/blender/source/gameengine/Physics/common/SConscript
    branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
    branches/blender2.5/blender/source/gameengine/Rasterizer/SConscript
    branches/blender2.5/blender/source/gameengine/SceneGraph/SConscript
    branches/blender2.5/blender/source/gameengine/VideoTexture/SConscript
    branches/blender2.5/blender/tools/btools.py

Modified: branches/blender2.5/blender/config/win32-vc-config.py
===================================================================
--- branches/blender2.5/blender/config/win32-vc-config.py	2009-09-01 22:41:15 UTC (rev 22939)
+++ branches/blender2.5/blender/config/win32-vc-config.py	2009-09-01 23:32:34 UTC (rev 22940)
@@ -149,6 +149,7 @@
 
 CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
 CXXFLAGS = ['/EHsc']
+BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast']
 
 BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
 

Modified: branches/blender2.5/blender/config/win64-vc-config.py
===================================================================
--- branches/blender2.5/blender/config/win64-vc-config.py	2009-09-01 22:41:15 UTC (rev 22939)
+++ branches/blender2.5/blender/config/win64-vc-config.py	2009-09-01 23:32:34 UTC (rev 22940)
@@ -163,6 +163,7 @@
 CFLAGS = []
 CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
 CXXFLAGS = ['/EHsc']
+BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast']
 
 BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
 

Modified: branches/blender2.5/blender/source/gameengine/BlenderRoutines/SConscript
===================================================================
--- branches/blender2.5/blender/source/gameengine/BlenderRoutines/SConscript	2009-09-01 22:41:15 UTC (rev 22939)
+++ branches/blender2.5/blender/source/gameengine/BlenderRoutines/SConscript	2009-09-01 23:32:34 UTC (rev 22940)
@@ -28,10 +28,4 @@
 incs += ' ' + env['BF_BULLET_INC']
 incs += ' ' + env['BF_OPENGL_INC']
 
-cxxflags = []
-if env['OURPLATFORM'] in ('win32-vc','win64-vc'):
-	cxxflags.append ('/GR')
-	cxxflags.append ('/O2')
-	cxxflags.append ('/EHsc')
-
-env.BlenderLib ( 'bf_bloutines', sources, Split(incs), defs, libtype=['core', 'player'], priority=[300, 45] , cxx_compileflags=cxxflags)
+env.BlenderLib ( 'bf_bloutines', sources, Split(incs), defs, libtype=['core', 'player'], priority=[300, 45] , cxx_compileflags=env['BGE_CXXFLAGS'])

Modified: branches/blender2.5/blender/source/gameengine/Converter/SConscript
===================================================================
--- branches/blender2.5/blender/source/gameengine/Converter/SConscript	2009-09-01 22:41:15 UTC (rev 22939)
+++ branches/blender2.5/blender/source/gameengine/Converter/SConscript	2009-09-01 23:32:34 UTC (rev 22940)
@@ -23,4 +23,4 @@
 incs += ' ' + env['BF_PYTHON_INC']
 incs += ' ' + env['BF_BULLET_INC']
 
-env.BlenderLib ( 'bf_converter', sources, Split(incs), defs, libtype=['core','player'], priority=[305,50] )
+env.BlenderLib ( 'bf_converter', sources, Split(incs), defs, libtype=['core','player'], priority=[305,50], cxx_compileflags=env['BGE_CXXFLAGS'])

Modified: branches/blender2.5/blender/source/gameengine/Expressions/SConscript
===================================================================
--- branches/blender2.5/blender/source/gameengine/Expressions/SConscript	2009-09-01 22:41:15 UTC (rev 22939)
+++ branches/blender2.5/blender/source/gameengine/Expressions/SConscript	2009-09-01 23:32:34 UTC (rev 22940)
@@ -6,10 +6,4 @@
 incs ='. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/SceneGraph #source/blender/blenloader'
 incs += ' ' + env['BF_PYTHON_INC']
 
-cxxflags = []
-if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
-	cxxflags.append ('/GR')
-	cxxflags.append ('/O2')
-	cxxflags.append ('/EHsc')
-
-env.BlenderLib ( 'bf_expressions', sources, Split(incs), [], libtype=['core','player'], priority = [360,120], cxx_compileflags=cxxflags)
+env.BlenderLib ( 'bf_expressions', sources, Split(incs), [], libtype=['core','player'], priority = [360,120], cxx_compileflags=env['BGE_CXXFLAGS'])

Modified: branches/blender2.5/blender/source/gameengine/GameLogic/SConscript
===================================================================
--- branches/blender2.5/blender/source/gameengine/GameLogic/SConscript	2009-09-01 22:41:15 UTC (rev 22939)
+++ branches/blender2.5/blender/source/gameengine/GameLogic/SConscript	2009-09-01 23:32:34 UTC (rev 22940)
@@ -17,12 +17,8 @@
 else:
 	defs.append('DISABLE_SDL')
 
-cxxflags = []
 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
-	cxxflags.append ('/GR')
-	cxxflags.append ('/O2')
-	cxxflags.append ('/EHsc')
 	if env['BF_DEBUG']:
 		defs.append('_DEBUG')
 
-env.BlenderLib ( 'bf_logic', sources, Split(incs), defs, libtype=['core','player'], priority=[330, 100], cxx_compileflags=cxxflags )
+env.BlenderLib ( 'bf_logic', sources, Split(incs), defs, libtype=['core','player'], priority=[330, 100], cxx_compileflags=env['BGE_CXXFLAGS'])

Modified: branches/blender2.5/blender/source/gameengine/GamePlayer/common/SConscript
===================================================================
--- branches/blender2.5/blender/source/gameengine/GamePlayer/common/SConscript	2009-09-01 22:41:15 UTC (rev 22939)
+++ branches/blender2.5/blender/source/gameengine/GamePlayer/common/SConscript	2009-09-01 23:32:34 UTC (rev 22940)
@@ -62,10 +62,4 @@
 incs += Split(env['BF_PNG_INC'])
 incs += Split(env['BF_ZLIB_INC'])
 
-cxxflags = []
-if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
-	cxxflags.append ('/GR')
-	cxxflags.append ('/O2')
-	cxxflags.append ('/EHsc')
-
-env.BlenderLib (libname='gp_common', sources=source_files, includes=incs, defines = [], libtype='player', priority=5, cxx_compileflags=cxxflags)
+env.BlenderLib (libname='gp_common', sources=source_files, includes=incs, defines = [], libtype='player', priority=5, cxx_compileflags=env['BGE_CXXFLAGS'])

Modified: branches/blender2.5/blender/source/gameengine/GamePlayer/ghost/SConscript
===================================================================
--- branches/blender2.5/blender/source/gameengine/GamePlayer/ghost/SConscript	2009-09-01 22:41:15 UTC (rev 22939)
+++ branches/blender2.5/blender/source/gameengine/GamePlayer/ghost/SConscript	2009-09-01 23:32:34 UTC (rev 22940)
@@ -42,14 +42,8 @@
 
 incs += Split(env['BF_PYTHON_INC'])
 
-cxxflags = []
-if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
-	cxxflags.append ('/GR')
-	cxxflags.append ('/O2')
-	cxxflags.append ('/EHsc')
-
-defs = ''
+defs = []
 if env['WITH_BF_FFMPEG']:
-    defs += ' WITH_FFMPEG'
+    defs.append('WITH_FFMPEG')
 
-env.BlenderLib (libname='gp_ghost', sources=source_files, includes = incs, defines = Split(defs), libtype='player',priority=5, cxx_compileflags=cxxflags)
+env.BlenderLib (libname='gp_ghost', sources=source_files, includes = incs, defines = defs, libtype='player',priority=5, cxx_compileflags=env['BGE_CXXFLAGS'])

Modified: branches/blender2.5/blender/source/gameengine/Ketsji/KXNetwork/SConscript
===================================================================
--- branches/blender2.5/blender/source/gameengine/Ketsji/KXNetwork/SConscript	2009-09-01 22:41:15 UTC (rev 22939)
+++ branches/blender2.5/blender/source/gameengine/Ketsji/KXNetwork/SConscript	2009-09-01 23:32:34 UTC (rev 22940)
@@ -9,11 +9,4 @@
 
 incs += ' ' + env['BF_PYTHON_INC']
 
-cxxflags = []
-if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
-	cxxflags.append ('/GR')
-	cxxflags.append ('/O2')
-	cxxflags.append ('/EHsc')
-
-
-env.BlenderLib ( 'kx_network', Split(sources), Split(incs), defines=[],libtype=['core', 'player'], priority=[400, 145], cxx_compileflags=cxxflags )
+env.BlenderLib ( 'kx_network', Split(sources), Split(incs), defines=[],libtype=['core', 'player'], priority=[400, 145], cxx_compileflags=env['BGE_CXXFLAGS'])

Modified: branches/blender2.5/blender/source/gameengine/Ketsji/SConscript
===================================================================
--- branches/blender2.5/blender/source/gameengine/Ketsji/SConscript	2009-09-01 22:41:15 UTC (rev 22939)
+++ branches/blender2.5/blender/source/gameengine/Ketsji/SConscript	2009-09-01 23:32:34 UTC (rev 22940)
@@ -29,12 +29,8 @@
 else:
 	defs.append('DISABLE_SDL')
 	
-cxxflags = []
 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
-	cxxflags.append ('/GR')
-	cxxflags.append ('/O2')
-	cxxflags.append ('/EHsc')
 	if env['BF_DEBUG']:
 		defs.append('_DEBUG') # for Python
 
-env.BlenderLib ( 'bf_ketsji', sources, Split(incs), defs, libtype=['core','player'], priority=[320, 60], cxx_compileflags = cxxflags )
+env.BlenderLib ( 'bf_ketsji', sources, Split(incs), defs, libtype=['core','player'], priority=[320, 60], cxx_compileflags=env['BGE_CXXFLAGS'])

Modified: branches/blender2.5/blender/source/gameengine/Physics/Bullet/SConscript
===================================================================
--- branches/blender2.5/blender/source/gameengine/Physics/Bullet/SConscript	2009-09-01 22:41:15 UTC (rev 22939)
+++ branches/blender2.5/blender/source/gameengine/Physics/Bullet/SConscript	2009-09-01 23:32:34 UTC (rev 22940)
@@ -21,10 +21,4 @@
 incs += ' ' + env['BF_BULLET_INC']
 incs += ' ' + env['BF_PYTHON_INC']
 
-cxxflags = []
-if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
-	cxxflags.append ('/GR')
-	cxxflags.append ('/O2')
-	cxxflags.append ('/EHsc')
-
-env.BlenderLib ( 'bf_bullet', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350,80], cxx_compileflags=cxxflags )
+env.BlenderLib ( 'bf_bullet', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350,80], cxx_compileflags=env['BGE_CXXFLAGS'])

Modified: branches/blender2.5/blender/source/gameengine/Physics/common/SConscript
===================================================================
--- branches/blender2.5/blender/source/gameengine/Physics/common/SConscript	2009-09-01 22:41:15 UTC (rev 22939)
+++ branches/blender2.5/blender/source/gameengine/Physics/common/SConscript	2009-09-01 23:32:34 UTC (rev 22940)
@@ -5,10 +5,4 @@
 
 incs = '. ../Dummy #intern/moto/include'
 
-cxxflags = []
-if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
-	cxxflags.append ('/GR')
-	cxxflags.append ('/O2')
-	cxxflags.append ('/EHsc')
-
-env.BlenderLib ( 'bf_common', Split(sources), Split(incs), [], libtype=['core','player'], priority=[360, 90], cxx_compileflags = cxxflags )
+env.BlenderLib ( 'bf_common', Split(sources), Split(incs), [], libtype=['core','player'], priority=[360, 90], cxx_compileflags=env['BGE_CXXFLAGS'])

Modified: branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
===================================================================

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list