scons: Use -Werror MSVC compatibility flags per-directory.
[mesa.git] / src / gallium / drivers / llvmpipe / SConscript
1 from sys import executable as python_cmd
2 import distutils.version
3
4 Import('*')
5
6 if not env['llvm']:
7 print 'warning: LLVM disabled: not building llvmpipe'
8 Return()
9
10 env = env.Clone()
11
12 env.MSVC2008Compat()
13
14 llvmpipe = env.ConvenienceLibrary(
15 target = 'llvmpipe',
16 source = env.ParseSourceList('Makefile.sources', 'C_SOURCES')
17 )
18
19 env.Alias('llvmpipe', llvmpipe)
20
21
22 if not env['embedded']:
23 env = env.Clone()
24
25 env.Prepend(LIBS = [llvmpipe, gallium, mesautil])
26
27 tests = [
28 'format',
29 'blend',
30 'conv',
31 'printf',
32 ]
33
34 if not env['msvc']:
35 tests.append('arit')
36
37 for test in tests:
38 testname = 'lp_test_' + test
39 target = env.Program(
40 target = testname,
41 source = [testname + '.c', 'lp_test_main.c'],
42 )
43 env.InstallProgram(target)
44
45 # http://www.scons.org/wiki/UnitTests
46 alias = env.Alias(testname, [target], target[0].abspath)
47 AlwaysBuild(alias)
48
49 Export('llvmpipe')