summaryrefslogtreecommitdiffstats
path: root/test cases/common/25 config subdir
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/common/25 config subdir')
-rw-r--r--test cases/common/25 config subdir/include/config.h.in6
-rw-r--r--test cases/common/25 config subdir/include/meson.build4
-rw-r--r--test cases/common/25 config subdir/meson.build6
-rw-r--r--test cases/common/25 config subdir/src/meson.build2
-rw-r--r--test cases/common/25 config subdir/src/prog.c5
5 files changed, 23 insertions, 0 deletions
diff --git a/test cases/common/25 config subdir/include/config.h.in b/test cases/common/25 config subdir/include/config.h.in
new file mode 100644
index 0000000..4c3c62d
--- /dev/null
+++ b/test cases/common/25 config subdir/include/config.h.in
@@ -0,0 +1,6 @@
+#ifndef CONFIG_H_
+#define CONFIG_H_
+
+#define RETURN_VALUE @number@
+
+#endif
diff --git a/test cases/common/25 config subdir/include/meson.build b/test cases/common/25 config subdir/include/meson.build
new file mode 100644
index 0000000..f14111a
--- /dev/null
+++ b/test cases/common/25 config subdir/include/meson.build
@@ -0,0 +1,4 @@
+conf_data = configuration_data()
+conf_data.set('number', '0')
+
+configure_file(input:'config.h.in', output:'config.h', configuration:conf_data)
diff --git a/test cases/common/25 config subdir/meson.build b/test cases/common/25 config subdir/meson.build
new file mode 100644
index 0000000..25f53db
--- /dev/null
+++ b/test cases/common/25 config subdir/meson.build
@@ -0,0 +1,6 @@
+project('subdirconfig', 'c')
+
+inc = include_directories('include')
+
+subdir('include')
+subdir('src')
diff --git a/test cases/common/25 config subdir/src/meson.build b/test cases/common/25 config subdir/src/meson.build
new file mode 100644
index 0000000..97598a4
--- /dev/null
+++ b/test cases/common/25 config subdir/src/meson.build
@@ -0,0 +1,2 @@
+exe = executable('prog', 'prog.c', include_directories : inc)
+test('subdir config', exe)
diff --git a/test cases/common/25 config subdir/src/prog.c b/test cases/common/25 config subdir/src/prog.c
new file mode 100644
index 0000000..b9db890
--- /dev/null
+++ b/test cases/common/25 config subdir/src/prog.c
@@ -0,0 +1,5 @@
+#include "config.h"
+
+int main(void) {
+ return RETURN_VALUE;
+}