diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/unit/95 custominc | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/unit/95 custominc')
-rw-r--r-- | meson/test cases/unit/95 custominc/easytogrepfor/genh.py | 7 | ||||
-rw-r--r-- | meson/test cases/unit/95 custominc/easytogrepfor/meson.build | 3 | ||||
-rw-r--r-- | meson/test cases/unit/95 custominc/helper.c | 5 | ||||
-rw-r--r-- | meson/test cases/unit/95 custominc/meson.build | 9 | ||||
-rw-r--r-- | meson/test cases/unit/95 custominc/prog.c | 9 | ||||
-rw-r--r-- | meson/test cases/unit/95 custominc/prog2.c | 10 |
6 files changed, 43 insertions, 0 deletions
diff --git a/meson/test cases/unit/95 custominc/easytogrepfor/genh.py b/meson/test cases/unit/95 custominc/easytogrepfor/genh.py new file mode 100644 index 000000000..48e033a72 --- /dev/null +++ b/meson/test cases/unit/95 custominc/easytogrepfor/genh.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +import sys + +f = open(sys.argv[1], 'w') +f.write('#define RETURN_VALUE 0') +f.close() diff --git a/meson/test cases/unit/95 custominc/easytogrepfor/meson.build b/meson/test cases/unit/95 custominc/easytogrepfor/meson.build new file mode 100644 index 000000000..e749753bc --- /dev/null +++ b/meson/test cases/unit/95 custominc/easytogrepfor/meson.build @@ -0,0 +1,3 @@ +genh = custom_target('header', + output: 'generated.h', + command: [find_program('genh.py'), '@OUTPUT@']) diff --git a/meson/test cases/unit/95 custominc/helper.c b/meson/test cases/unit/95 custominc/helper.c new file mode 100644 index 000000000..3237441bc --- /dev/null +++ b/meson/test cases/unit/95 custominc/helper.c @@ -0,0 +1,5 @@ +#include<generated.h> + +int func(void) { + return RETURN_VALUE; +} diff --git a/meson/test cases/unit/95 custominc/meson.build b/meson/test cases/unit/95 custominc/meson.build new file mode 100644 index 000000000..bab113908 --- /dev/null +++ b/meson/test cases/unit/95 custominc/meson.build @@ -0,0 +1,9 @@ +project('implicit custom dirs', 'c') + +subdir('easytogrepfor') + +l = static_library('helper', 'helper.c', genh) +d = declare_dependency(link_with: l, sources: genh) +executable('prog', 'prog.c', dependencies: d, implicit_include_directories: false) + +executable('prog2', 'prog2.c', dependencies: d) diff --git a/meson/test cases/unit/95 custominc/prog.c b/meson/test cases/unit/95 custominc/prog.c new file mode 100644 index 000000000..db9df9d5e --- /dev/null +++ b/meson/test cases/unit/95 custominc/prog.c @@ -0,0 +1,9 @@ +#include<stdlib.h> + +int func(void); + +int main(int argc, char **argv) { + (void)argc; + (void)(argv); + return func(); +} diff --git a/meson/test cases/unit/95 custominc/prog2.c b/meson/test cases/unit/95 custominc/prog2.c new file mode 100644 index 000000000..e64b22919 --- /dev/null +++ b/meson/test cases/unit/95 custominc/prog2.c @@ -0,0 +1,10 @@ +#include<stdlib.h> +#include<generated.h> + +int func(void); + +int main(int argc, char **argv) { + (void)argc; + (void)(argv); + return func() + RETURN_VALUE; +} |