Add generated C file to mixed sources Vala test
This tests that generated C files make it past the filtering in generate_vale_compile().
This commit is contained in:
parent
65e9761cb1
commit
3032c2b580
|
@ -0,0 +1,5 @@
|
|||
int retval (void);
|
||||
|
||||
int test (void) {
|
||||
return retval ();
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
writec = find_program('writec.py')
|
||||
|
||||
retval = custom_target('writec',
|
||||
output : 'retval.c',
|
||||
command : [writec, '@OUTPUT@'])
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
|
||||
c = '''int
|
||||
retval(void) {
|
||||
return 0;
|
||||
}
|
||||
'''
|
||||
|
||||
with open(sys.argv[1], 'w') as f:
|
||||
f.write(c)
|
|
@ -1,3 +0,0 @@
|
|||
int test () {
|
||||
return 0;
|
||||
}
|
|
@ -2,4 +2,6 @@ project('foo', 'c', 'vala')
|
|||
|
||||
glib = dependency('glib-2.0')
|
||||
|
||||
executable('foo', 'foo.c', 'bar.vala', dependencies: [glib])
|
||||
subdir('c')
|
||||
e = executable('foo', 'c/foo.c', retval, 'vala/bar.vala', dependencies: [glib])
|
||||
test('test foo', e)
|
||||
|
|
Loading…
Reference in New Issue