You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
project('generatorcustom', 'c')
|
|
|
|
|
|
|
|
creator = find_program('gen.py')
|
|
|
|
catter = find_program('catter.py')
|
|
|
|
|
|
|
|
gen = generator(creator,
|
|
|
|
output: '@BASENAME@.h',
|
|
|
|
arguments : ['@INPUT@', '@OUTPUT@'])
|
|
|
|
|
|
|
|
hs = gen.process('res1.txt', 'res2.txt')
|
|
|
|
|
|
|
|
allinone = custom_target('alltogether',
|
|
|
|
input : hs,
|
|
|
|
output : 'alltogether.h',
|
|
|
|
command : [catter, '@INPUT@', '@OUTPUT@'])
|
|
|
|
|
ninjabackend: check if target has compiler attribute
otherwise we are getting errors like:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/mesonbuild/mesonmain.py", line 131, in run
return options.run_func(options)
File "/usr/local/lib/python3.6/dist-packages/mesonbuild/msetup.py", line 245, in run
app.generate()
File "/usr/local/lib/python3.6/dist-packages/mesonbuild/msetup.py", line 159, in generate
self._generate(env)
File "/usr/local/lib/python3.6/dist-packages/mesonbuild/msetup.py", line 215, in _generate
intr.backend.generate()
File "/usr/local/lib/python3.6/dist-packages/mesonbuild/backend/ninjabackend.py", line 518, in generate
self.generate_coverage_rules()
File "/usr/local/lib/python3.6/dist-packages/mesonbuild/backend/ninjabackend.py", line 991, in generate_coverage_rules
self.generate_coverage_command(e, [])
File "/usr/local/lib/python3.6/dist-packages/mesonbuild/backend/ninjabackend.py", line 975, in generate_coverage_command
for compiler in target.compilers.values():
AttributeError: 'RunTarget' object has no attribute 'compilers'
This extends the 109 generatecode test case to also define a test, so
coverage can really detect something.
4 years ago
|
|
|
proggie = executable('proggie', 'main.c', allinone)
|
|
|
|
|
|
|
|
test('proggie', proggie)
|
|
|
|
|