From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- meson/test cases/unit/12 promote/subprojects/s1/meson.build | 7 +++++++ meson/test cases/unit/12 promote/subprojects/s1/s1.c | 6 ++++++ .../unit/12 promote/subprojects/s1/subprojects/s3/meson.build | 4 ++++ .../test cases/unit/12 promote/subprojects/s1/subprojects/s3/s3.c | 3 +++ .../unit/12 promote/subprojects/s1/subprojects/scommon/meson.build | 4 ++++ .../12 promote/subprojects/s1/subprojects/scommon/scommon_broken.c | 1 + meson/test cases/unit/12 promote/subprojects/s2/meson.build | 6 ++++++ meson/test cases/unit/12 promote/subprojects/s2/s2.c | 6 ++++++ .../unit/12 promote/subprojects/s2/subprojects/athing.wrap | 1 + .../unit/12 promote/subprojects/s2/subprojects/scommon/meson.build | 4 ++++ .../12 promote/subprojects/s2/subprojects/scommon/scommon_ok.c | 3 +++ 11 files changed, 45 insertions(+) create mode 100644 meson/test cases/unit/12 promote/subprojects/s1/meson.build create mode 100644 meson/test cases/unit/12 promote/subprojects/s1/s1.c create mode 100644 meson/test cases/unit/12 promote/subprojects/s1/subprojects/s3/meson.build create mode 100644 meson/test cases/unit/12 promote/subprojects/s1/subprojects/s3/s3.c create mode 100644 meson/test cases/unit/12 promote/subprojects/s1/subprojects/scommon/meson.build create mode 100644 meson/test cases/unit/12 promote/subprojects/s1/subprojects/scommon/scommon_broken.c create mode 100644 meson/test cases/unit/12 promote/subprojects/s2/meson.build create mode 100644 meson/test cases/unit/12 promote/subprojects/s2/s2.c create mode 100644 meson/test cases/unit/12 promote/subprojects/s2/subprojects/athing.wrap create mode 100644 meson/test cases/unit/12 promote/subprojects/s2/subprojects/scommon/meson.build create mode 100644 meson/test cases/unit/12 promote/subprojects/s2/subprojects/scommon/scommon_ok.c (limited to 'meson/test cases/unit/12 promote/subprojects') diff --git a/meson/test cases/unit/12 promote/subprojects/s1/meson.build b/meson/test cases/unit/12 promote/subprojects/s1/meson.build new file mode 100644 index 000000000..88c467bf4 --- /dev/null +++ b/meson/test cases/unit/12 promote/subprojects/s1/meson.build @@ -0,0 +1,7 @@ +project('s1', 'c') + +sc = subproject('scommon') +s3 = subproject('s3') + +executable('s1', 's1.c', + link_with : [sc.get_variable('clib'), s3.get_variable('l')]) diff --git a/meson/test cases/unit/12 promote/subprojects/s1/s1.c b/meson/test cases/unit/12 promote/subprojects/s1/s1.c new file mode 100644 index 000000000..7d1d775c1 --- /dev/null +++ b/meson/test cases/unit/12 promote/subprojects/s1/s1.c @@ -0,0 +1,6 @@ +int func(); +int func2(); + +int main(int argc, char **argv) { + return func() + func2(); +} diff --git a/meson/test cases/unit/12 promote/subprojects/s1/subprojects/s3/meson.build b/meson/test cases/unit/12 promote/subprojects/s1/subprojects/s3/meson.build new file mode 100644 index 000000000..894fe265b --- /dev/null +++ b/meson/test cases/unit/12 promote/subprojects/s1/subprojects/s3/meson.build @@ -0,0 +1,4 @@ +project('s3', 'c') + +l = static_library('s3', 's3.c') + diff --git a/meson/test cases/unit/12 promote/subprojects/s1/subprojects/s3/s3.c b/meson/test cases/unit/12 promote/subprojects/s1/subprojects/s3/s3.c new file mode 100644 index 000000000..0166603e5 --- /dev/null +++ b/meson/test cases/unit/12 promote/subprojects/s1/subprojects/s3/s3.c @@ -0,0 +1,3 @@ +int func2() { + return -42; +} diff --git a/meson/test cases/unit/12 promote/subprojects/s1/subprojects/scommon/meson.build b/meson/test cases/unit/12 promote/subprojects/s1/subprojects/scommon/meson.build new file mode 100644 index 000000000..231f2757b --- /dev/null +++ b/meson/test cases/unit/12 promote/subprojects/s1/subprojects/scommon/meson.build @@ -0,0 +1,4 @@ +project('scommon', 'c') + +clib = static_library('scommon', 'scommon_broken.c') + diff --git a/meson/test cases/unit/12 promote/subprojects/s1/subprojects/scommon/scommon_broken.c b/meson/test cases/unit/12 promote/subprojects/s1/subprojects/scommon/scommon_broken.c new file mode 100644 index 000000000..3665a9cbc --- /dev/null +++ b/meson/test cases/unit/12 promote/subprojects/s1/subprojects/scommon/scommon_broken.c @@ -0,0 +1 @@ +#error This file must not be used. The other scommon one should be instead. diff --git a/meson/test cases/unit/12 promote/subprojects/s2/meson.build b/meson/test cases/unit/12 promote/subprojects/s2/meson.build new file mode 100644 index 000000000..32bcf8f39 --- /dev/null +++ b/meson/test cases/unit/12 promote/subprojects/s2/meson.build @@ -0,0 +1,6 @@ +project('s2', 'c') + +sc = subproject('scommon') + +executable('s2', 's2.c', link_with : sc.get_variable('clib')) + diff --git a/meson/test cases/unit/12 promote/subprojects/s2/s2.c b/meson/test cases/unit/12 promote/subprojects/s2/s2.c new file mode 100644 index 000000000..2a6d1e63d --- /dev/null +++ b/meson/test cases/unit/12 promote/subprojects/s2/s2.c @@ -0,0 +1,6 @@ +int func(); + + +int main(int argc, char **argv) { + return func() != 42; +} diff --git a/meson/test cases/unit/12 promote/subprojects/s2/subprojects/athing.wrap b/meson/test cases/unit/12 promote/subprojects/s2/subprojects/athing.wrap new file mode 100644 index 000000000..11b217878 --- /dev/null +++ b/meson/test cases/unit/12 promote/subprojects/s2/subprojects/athing.wrap @@ -0,0 +1 @@ +[wrap-file] diff --git a/meson/test cases/unit/12 promote/subprojects/s2/subprojects/scommon/meson.build b/meson/test cases/unit/12 promote/subprojects/s2/subprojects/scommon/meson.build new file mode 100644 index 000000000..e0d8c7ddc --- /dev/null +++ b/meson/test cases/unit/12 promote/subprojects/s2/subprojects/scommon/meson.build @@ -0,0 +1,4 @@ +project('scommon', 'c') + +clib = static_library('scommon', 'scommon_ok.c') + diff --git a/meson/test cases/unit/12 promote/subprojects/s2/subprojects/scommon/scommon_ok.c b/meson/test cases/unit/12 promote/subprojects/s2/subprojects/scommon/scommon_ok.c new file mode 100644 index 000000000..652f4eb13 --- /dev/null +++ b/meson/test cases/unit/12 promote/subprojects/s2/subprojects/scommon/scommon_ok.c @@ -0,0 +1,3 @@ +int func() { + return 42; +} -- cgit 1.2.3-korg