aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/unit/66 static archive stripping
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/unit/66 static archive stripping
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/unit/66 static archive stripping')
-rw-r--r--meson/test cases/unit/66 static archive stripping/app/appA.c4
-rw-r--r--meson/test cases/unit/66 static archive stripping/app/appB.c4
-rw-r--r--meson/test cases/unit/66 static archive stripping/app/meson.build7
-rw-r--r--meson/test cases/unit/66 static archive stripping/lib/libA.c5
-rw-r--r--meson/test cases/unit/66 static archive stripping/lib/libA.h1
-rw-r--r--meson/test cases/unit/66 static archive stripping/lib/libB.c5
-rw-r--r--meson/test cases/unit/66 static archive stripping/lib/libB.h1
-rw-r--r--meson/test cases/unit/66 static archive stripping/lib/meson.build23
8 files changed, 50 insertions, 0 deletions
diff --git a/meson/test cases/unit/66 static archive stripping/app/appA.c b/meson/test cases/unit/66 static archive stripping/app/appA.c
new file mode 100644
index 000000000..e44b54a92
--- /dev/null
+++ b/meson/test cases/unit/66 static archive stripping/app/appA.c
@@ -0,0 +1,4 @@
+#include <stdio.h>
+#include <libA.h>
+
+int main(void) { printf("The answer is: %d\n", libA_func()); }
diff --git a/meson/test cases/unit/66 static archive stripping/app/appB.c b/meson/test cases/unit/66 static archive stripping/app/appB.c
new file mode 100644
index 000000000..0ec0b629e
--- /dev/null
+++ b/meson/test cases/unit/66 static archive stripping/app/appB.c
@@ -0,0 +1,4 @@
+#include <stdio.h>
+#include <libB.h>
+
+int main(void) { printf("The answer is: %d\n", libB_func()); }
diff --git a/meson/test cases/unit/66 static archive stripping/app/meson.build b/meson/test cases/unit/66 static archive stripping/app/meson.build
new file mode 100644
index 000000000..118719dec
--- /dev/null
+++ b/meson/test cases/unit/66 static archive stripping/app/meson.build
@@ -0,0 +1,7 @@
+project('app', ['c'])
+
+a = dependency('test-a')
+b = dependency('test-b')
+
+executable('appA', files('appA.c'), dependencies : a)
+executable('appB', files('appB.c'), dependencies : b)
diff --git a/meson/test cases/unit/66 static archive stripping/lib/libA.c b/meson/test cases/unit/66 static archive stripping/lib/libA.c
new file mode 100644
index 000000000..a97185e56
--- /dev/null
+++ b/meson/test cases/unit/66 static archive stripping/lib/libA.c
@@ -0,0 +1,5 @@
+#include <libA.h>
+
+static int libA_func_impl(void) { return 0; }
+
+int libA_func(void) { return libA_func_impl(); }
diff --git a/meson/test cases/unit/66 static archive stripping/lib/libA.h b/meson/test cases/unit/66 static archive stripping/lib/libA.h
new file mode 100644
index 000000000..e6450cd1e
--- /dev/null
+++ b/meson/test cases/unit/66 static archive stripping/lib/libA.h
@@ -0,0 +1 @@
+int libA_func(void);
diff --git a/meson/test cases/unit/66 static archive stripping/lib/libB.c b/meson/test cases/unit/66 static archive stripping/lib/libB.c
new file mode 100644
index 000000000..0200b1f05
--- /dev/null
+++ b/meson/test cases/unit/66 static archive stripping/lib/libB.c
@@ -0,0 +1,5 @@
+#include <libB.h>
+
+static int libB_func_impl(void) { return 0; }
+
+int libB_func(void) { return libB_func_impl(); }
diff --git a/meson/test cases/unit/66 static archive stripping/lib/libB.h b/meson/test cases/unit/66 static archive stripping/lib/libB.h
new file mode 100644
index 000000000..065a4a411
--- /dev/null
+++ b/meson/test cases/unit/66 static archive stripping/lib/libB.h
@@ -0,0 +1 @@
+int libB_func(void);
diff --git a/meson/test cases/unit/66 static archive stripping/lib/meson.build b/meson/test cases/unit/66 static archive stripping/lib/meson.build
new file mode 100644
index 000000000..ae50fa7b4
--- /dev/null
+++ b/meson/test cases/unit/66 static archive stripping/lib/meson.build
@@ -0,0 +1,23 @@
+project('lib', ['c'])
+
+pkg = import('pkgconfig')
+
+a = library('test-a', files('libA.c'), install: true)
+install_headers(files('libA.h'), subdir: 'libA')
+pkg.generate(
+ a,
+ version: '0.0',
+ description: 'test library libA',
+ filebase: 'test-a',
+ name: 'test library libA',
+ subdirs: 'libA')
+
+b = static_library('test-b', files('libB.c'), install: true)
+install_headers(files('libB.h'), subdir: 'libB')
+pkg.generate(
+ b,
+ version: '0.0',
+ description: 'test library libB',
+ filebase: 'test-b',
+ name: 'test library libB',
+ subdirs: 'libB')