Cycles: attempted fix for error building with sse/mtune optimization flags.
[blender.git] / intern / cycles / SConscript
1 #!/usr/bin/python
2 from os import path
3 Import('env')
4
5 cycles = env.Clone()
6
7 cycles.Depends('../../source/blender/makesrna/intern/RNA_blender_cpp.h', 'makesrna')
8
9 sources = cycles.Glob('bvh/*.cpp') + cycles.Glob('device/*.cpp') + cycles.Glob('kernel/*.cpp') + cycles.Glob('render/*.cpp') + cycles.Glob('subd/*.cpp') + cycles.Glob('util/*.cpp') + cycles.Glob('util/*.c') + cycles.Glob('blender/*.cpp')
10
11 sources.remove(path.join('util', 'util_view.cpp'))
12 sources.remove(path.join('render', 'film_response.cpp'))
13
14 incs = [] 
15 defs = []
16 ccflags = []
17 cxxflags = []
18
19 defs.append('CCL_NAMESPACE_BEGIN=namespace ccl {')
20 defs.append('CCL_NAMESPACE_END=}')
21
22 defs.append('WITH_OPENCL')
23 defs.append('WITH_MULTI')
24 defs.append('WITH_CUDA')
25
26 if env['OURPLATFORM'] in ('win32-mingw'):
27     cxxflags.append('-fno-rtti'.split())
28     if env['WITH_BF_RAYOPTIMIZATION']:
29         cxxflags.append('-ffast-math -msse -msse2 -msse3'.split())
30         ccflags.append('-ffast-math -msse -msse2 -msse3'.split())
31     defs.append('BOOST_NO_RTTI BOOST_NO_TYPEID'.split())
32
33 incs.extend('. bvh render device kernel kernel/osl kernel/svm util subd'.split())
34 incs.extend('#intern/guardedalloc #source/blender/makesrna #source/blender/makesdna'.split())
35 incs.extend('#source/blender/blenloader ../../source/blender/makesrna/intern'.split())
36 incs.extend('#extern/glew/include'.split())
37 incs.append(cycles['BF_OIIO_INC'])
38 incs.append(cycles['BF_BOOST_INC'])
39 incs.append(cycles['BF_PYTHON_INC'])
40
41 cycles.BlenderLib('bf_intern_cycles', sources, incs, defs, libtype=['intern'], priority=[0], compileflags=[None], cc_compileflags=ccflags, cxx_compileflags=cxxflags)
42