25 lines
621 B
Python
25 lines
621 B
Python
## -*- python -*-
|
|
|
|
import sys
|
|
import os.path
|
|
import os
|
|
import pproc as subprocess
|
|
|
|
|
|
def build(bld):
|
|
top_srcdir = bld.m_srcnode.abspath()
|
|
|
|
gen = bld.create_obj('command-output')
|
|
gen.command = 'test-generation.py'
|
|
gen.stdout = 'test.cc'
|
|
gen.argv = [gen.input_file('test-generation.py'), top_srcdir]
|
|
gen.command = bld.env()['PYTHON']
|
|
gen.command_is_external = True
|
|
gen.prio = 55
|
|
|
|
obj = bld.create_obj('cpp', 'objects', 'pyext')
|
|
obj.source = 'test.cc'
|
|
if os.path.basename(obj.env['CXX']).startswith("g++"):
|
|
obj.env.append_value('CXXFLAGS', ['-Werror', '-Wno-unused'])
|
|
|