Debian Codegraph @

benchmarks/wscript

raw
1 ## -*- python -*-
2
3 def configure(conf):
4 pass
5
6 def build(bld):
7
8 #
9 # PyBindGen
10 #
11 gen = bld(
12 features='command',
13 source='testapi-pybindgen.py',
14 target='testapimodule.cc',
15 command='${PYTHON} ${SRC[0]} > ${TGT[0]}')
16
17 obj = bld('cxx', 'shlib', 'pyext')
18 obj.source = [
19 'testapi.cc',
20 'testapimodule.cc'
21 ]
22 obj.target = 'testapi_pybindgen'
23 obj.install_path = None # do not install
24 obj.includes = '.'
25
26
27 #
28 # Boost::Python
29 #
30 obj = ('cxx', 'shlib', 'pyext')
31 obj.source = [
32 'testapi.cc',
33 'testapi_boost.cc'
34 ]
35 obj.target = 'testapi_boost'
36 obj.install_path = None # do not install
37 obj.includes = '.'
38 obj.env.append_value('LIB', 'boost_python-mt')
39
40
41 #
42 # SWIG
43 #
44
45 gen = bld(
46 features='command',
47 source='testapi_swig.i',
48 target='testapi_swig_module.cc',
49 command='swig -c++ -o ${TGT[0]} -python ${SRC[0]}')
50
51 obj = bld('cxx', 'shlib', 'pyext')
52 obj.source = [
53 'testapi.cc',
54 'testapi_swig_module.cc'
55 ]
56 obj.target = '_testapi_swig'
57 obj.install_path = None # do not install
58 obj.includes = '.'
59
60
61 #
62 # SIP
63 #
64 gen = bld(
65 features='command',
66 source='testapi.sip',
67 target='sipAPItestapi_sip.h siptestapi_sipcmodule.cpp siptestapi_sipMultiplier.cpp',
68 command='sip -c default/benchmarks ${SRC[0]}')
69
70 obj = bld('cxx', 'shlib', 'pyext')
71 obj.source = [
72 'testapi.cc',
73 'siptestapi_sipcmodule.cpp',
74 'siptestapi_sipMultiplier.cpp',
75 ]
76 obj.target = 'testapi_sip'
77 obj.install_path = None # do not install
78 obj.includes = '.'
79
80 # SIP does not like -fvisibility=hidden :-(
81 l = list(obj.env['CXXFLAGS_PYEXT'])
82 l.remove("-fvisibility=hidden")
83 obj.env['CXXFLAGS_PYEXT'] = l