Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/render/SConscript')
-rw-r--r--source/blender/render/SConscript33
1 files changed, 20 insertions, 13 deletions
diff --git a/source/blender/render/SConscript b/source/blender/render/SConscript
index d0cff4c1761..2327f4e069e 100644
--- a/source/blender/render/SConscript
+++ b/source/blender/render/SConscript
@@ -1,18 +1,21 @@
#!/usr/bin/python
Import ('env')
-if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'):
- # FIXME: need to set the appropriate flags for msvc, otherwise we get warnings
- cflags = []
- cxxflags = []
+cflags = env['CCFLAGS']
+cxxflags = env['CXXFLAGS']
+
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ if env['WITH_BF_RAYOPTIMIZATION']:
+ cflags = env['CCFLAGS'] + ['/arch:SSE']
+
+if env['OURPLATFORM'] == 'win32-mingw':
+ if env['WITH_BF_RAYOPTIMIZATION']:
+ cflags = env['CCFLAGS'] + ['-mfpmath=sse']
if env['OURPLATFORM'] == 'darwin':
- if env['MACOSX_ARCHITECTURE'] in ('i386', 'x86_64'):
- cflags = env['CFLAGS'] + ['-mfpmath=sse']
- cxxflags = env['CXXFLAGS'] + ['-mfpmath=sse']
- else:
- cflags = env['CFLAGS']
- cxxflags = env['CXXFLAGS']
+ if env['MACOSX_ARCHITECTURE'] in ('i386', 'x86_64') and env['WITH_BF_RAYOPTIMIZATION']:
+ cflags = env['CFLAGS'] + ['-mfpmath=sse']
+ cxxflags = env['CXXFLAGS'] + ['-mfpmath=sse']
sources = env.Glob('intern/source/*.c')
raysources = env.Glob('intern/raytrace/*.cpp')
@@ -31,15 +34,19 @@ if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
if env['OURPLATFORM'] == 'linux2':
-# SSE is NOT safe all the time on linux, plus that ignores users compile flags and therefore no no
+# SSE is NOT safe all the time on linux, plus that ignores users compile flags and therefore no no
# cflags = ['-O2','-msse2','-mfpmath=sse', '-pthread']
# cxxflags = ['-O2','-msse2','-mfpmath=sse', '-pthread']
- cflags = env['CCFLAGS']
- cxxflags = env['CXXFLAGS']
+ if env['WITH_BF_RAYOPTIMIZATION']:
+ cflags = env['CCFLAGS'] + ['-O2','-msse2','-mfpmath=sse', '-pthread']
+ cxxflags = env['CXXFLAGS'] + ['-O2','-msse2','-mfpmath=sse', '-pthread']
incs += ' ../../../extern/binreloc/include'
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
+if env['WITH_BF_RAYOPTIMIZATION']:
+ defs.append('__SSE__')
+
env.BlenderLib ( libname = 'bf_render', sources = sources, includes = Split(incs), defines=defs, libtype='core', priority=145, compileflags=cflags )
env.BlenderLib ( libname = 'bf_render_raytrace', sources = raysources, includes = Split(incs), defines=defs, libtype='core', priority=145, compileflags=cflags, cxx_compileflags=cxxflags )