summaryrefslogtreecommitdiffstats
path: root/test cases/common/18 includedir
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
commit7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch)
tree4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/common/18 includedir
parentInitial commit. (diff)
downloadmeson-upstream.tar.xz
meson-upstream.zip
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test cases/common/18 includedir')
-rw-r--r--test cases/common/18 includedir/include/func.h6
-rw-r--r--test cases/common/18 includedir/meson.build4
-rw-r--r--test cases/common/18 includedir/src/func.c5
-rw-r--r--test cases/common/18 includedir/src/meson.build5
-rw-r--r--test cases/common/18 includedir/src/prog.c5
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();
+}