parent
42a7f8e8ef
commit
1d56df9409
6 changed files with 28 additions and 0 deletions
@ -0,0 +1,3 @@ |
||||
int bar(void) { |
||||
return BAR; |
||||
} |
@ -0,0 +1 @@ |
||||
#include <foo.h> |
@ -0,0 +1,2 @@ |
||||
int bar(void); |
||||
int main(void) { return FOO + bar(); } |
@ -0,0 +1,15 @@ |
||||
project('preprocess', 'c') |
||||
|
||||
cc = meson.get_compiler('c') |
||||
|
||||
add_project_arguments(['-DFOO=0', '-DBAR=0'], language: 'c') |
||||
|
||||
pp_files = cc.preprocess('foo.c', 'bar.c', output: '@PLAINNAME@') |
||||
|
||||
foreach f : pp_files |
||||
message(f.full_path()) |
||||
endforeach |
||||
|
||||
subdir('src') |
||||
|
||||
test('test-foo', executable('app', pp_files, link_depends: file_map)) |
@ -0,0 +1,3 @@ |
||||
#if 1 |
||||
Hello World |
||||
#endif |
@ -0,0 +1,4 @@ |
||||
file_map = cc.preprocess('file.map.in', |
||||
output: '@BASENAME@', |
||||
compile_args: ['-x', 'assembler-with-cpp'], |
||||
) |
Loading…
Reference in new issue