From 645ab7fea8d88c3cfe18065c8dbf315feb1f0ba3 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 24 Feb 2014 01:14:38 +0200 Subject: [PATCH] Yo dawg, we heard you liked subprojects so we put subprojects in your subprojects so now you can use subprojects when you are using subprojects. --- test cases/common/53 subproject subproject/meson.build | 7 +++++++ test cases/common/53 subproject subproject/prog.c | 5 +++++ .../common/53 subproject subproject/subprojects/a/a.c | 4 ++++ .../53 subproject subproject/subprojects/a/meson.build | 4 ++++ .../common/53 subproject subproject/subprojects/b/b.c | 3 +++ .../53 subproject subproject/subprojects/b/meson.build | 3 +++ 6 files changed, 26 insertions(+) create mode 100644 test cases/common/53 subproject subproject/meson.build create mode 100644 test cases/common/53 subproject subproject/prog.c create mode 100644 test cases/common/53 subproject subproject/subprojects/a/a.c create mode 100644 test cases/common/53 subproject subproject/subprojects/a/meson.build create mode 100644 test cases/common/53 subproject subproject/subprojects/b/b.c create mode 100644 test cases/common/53 subproject subproject/subprojects/b/meson.build diff --git a/test cases/common/53 subproject subproject/meson.build b/test cases/common/53 subproject subproject/meson.build new file mode 100644 index 000000000..f7df3611d --- /dev/null +++ b/test cases/common/53 subproject subproject/meson.build @@ -0,0 +1,7 @@ +project('sub sub', 'c') + +a = subproject('a') +lib = a.get_variable('l') + +exe = executable('prog', 'prog.c', link_with : lib) +test('basic', exe) \ No newline at end of file diff --git a/test cases/common/53 subproject subproject/prog.c b/test cases/common/53 subproject subproject/prog.c new file mode 100644 index 000000000..394f139eb --- /dev/null +++ b/test cases/common/53 subproject subproject/prog.c @@ -0,0 +1,5 @@ +int func(); + +int main(int argc, char **argv) { + return func() == 42 ? 0 : 1; +} diff --git a/test cases/common/53 subproject subproject/subprojects/a/a.c b/test cases/common/53 subproject subproject/subprojects/a/a.c new file mode 100644 index 000000000..751749d0d --- /dev/null +++ b/test cases/common/53 subproject subproject/subprojects/a/a.c @@ -0,0 +1,4 @@ +int func2(); + +int func() { return func2(); } + diff --git a/test cases/common/53 subproject subproject/subprojects/a/meson.build b/test cases/common/53 subproject subproject/subprojects/a/meson.build new file mode 100644 index 000000000..f0dfc449e --- /dev/null +++ b/test cases/common/53 subproject subproject/subprojects/a/meson.build @@ -0,0 +1,4 @@ +project('a', 'c') + +b = subproject('b') +l = shared_library('a', 'a.c', link_with : b.get_variable('lb')) diff --git a/test cases/common/53 subproject subproject/subprojects/b/b.c b/test cases/common/53 subproject subproject/subprojects/b/b.c new file mode 100644 index 000000000..68e6ab975 --- /dev/null +++ b/test cases/common/53 subproject subproject/subprojects/b/b.c @@ -0,0 +1,3 @@ +int func2() { + return 42; +} diff --git a/test cases/common/53 subproject subproject/subprojects/b/meson.build b/test cases/common/53 subproject subproject/subprojects/b/meson.build new file mode 100644 index 000000000..e7af6067a --- /dev/null +++ b/test cases/common/53 subproject subproject/subprojects/b/meson.build @@ -0,0 +1,3 @@ +project('b', 'c') + +lb = shared_library('b', 'b.c')