Merge pull request #794 from mesonbuild/allgen
A target that has only generated sourcespull/809/head
commit
5fee7331cb
4 changed files with 38 additions and 1 deletions
@ -0,0 +1,8 @@ |
||||
#!/usr/bin/env python3 |
||||
|
||||
import sys |
||||
|
||||
ifile = sys.argv[1] |
||||
ofile = sys.argv[2] |
||||
|
||||
open(ofile, 'w').write(open(ifile).read()) |
@ -0,0 +1,6 @@ |
||||
#include<stdio.h> |
||||
|
||||
int main(int argc, char **argv) { |
||||
printf("I am a program.\n"); |
||||
return 0; |
||||
} |
@ -0,0 +1,20 @@ |
||||
# Must have two languages here to exercise linker language |
||||
# selection bug |
||||
project('all sources generated', 'c', 'cpp') |
||||
|
||||
comp = find_program('converter.py') |
||||
|
||||
g = generator(comp, |
||||
output : '@BASENAME@.cpp', |
||||
arguments : ['@INPUT@', '@OUTPUT@']) |
||||
|
||||
c = g.process('foobar.cpp.in') |
||||
|
||||
prog = executable('genexe', c) |
||||
|
||||
c2 = custom_target('c2gen', |
||||
output : 'c2gen.cpp', |
||||
input : 'foobar.cpp.in', |
||||
command : [comp, '@INPUT@', '@OUTPUT@']) |
||||
|
||||
prog2 = executable('genexe2', c2) |
Loading…
Reference in new issue