diff options
Diffstat (limited to 'test cases/common/18 includedir')
-rw-r--r-- | test cases/common/18 includedir/include/func.h | 6 | ||||
-rw-r--r-- | test cases/common/18 includedir/meson.build | 4 | ||||
-rw-r--r-- | test cases/common/18 includedir/src/func.c | 5 | ||||
-rw-r--r-- | test cases/common/18 includedir/src/meson.build | 5 | ||||
-rw-r--r-- | test cases/common/18 includedir/src/prog.c | 5 |
5 files changed, 25 insertions, 0 deletions
diff --git a/test cases/common/18 includedir/include/func.h b/test cases/common/18 includedir/include/func.h new file mode 100644 index 0000000..647b72f --- /dev/null +++ b/test cases/common/18 includedir/include/func.h @@ -0,0 +1,6 @@ +#ifndef FUNC_H__ +#define FUNC_H__ + +int func(void); + +#endif diff --git a/test cases/common/18 includedir/meson.build b/test cases/common/18 includedir/meson.build new file mode 100644 index 0000000..17eec0e --- /dev/null +++ b/test cases/common/18 includedir/meson.build @@ -0,0 +1,4 @@ +project('include dir test', 'c') + +inc = include_directories('include') +subdir('src') diff --git a/test cases/common/18 includedir/src/func.c b/test cases/common/18 includedir/src/func.c new file mode 100644 index 0000000..215beff --- /dev/null +++ b/test cases/common/18 includedir/src/func.c @@ -0,0 +1,5 @@ +#include "func.h" + +int func(void) { + return 0; +} diff --git a/test cases/common/18 includedir/src/meson.build b/test cases/common/18 includedir/src/meson.build new file mode 100644 index 0000000..30d2e0c --- /dev/null +++ b/test cases/common/18 includedir/src/meson.build @@ -0,0 +1,5 @@ +exe = executable('prog', 'prog.c', 'func.c', include_directories : inc) +test('inc test', exe) + +exe2 = executable('prog2', 'prog.c', 'func.c', include_directories : [['../include']]) +test('inc test 2', exe2) diff --git a/test cases/common/18 includedir/src/prog.c b/test cases/common/18 includedir/src/prog.c new file mode 100644 index 0000000..ce4dd67 --- /dev/null +++ b/test cases/common/18 includedir/src/prog.c @@ -0,0 +1,5 @@ +#include "func.h" + +int main(void) { + return func(); +} |