Add a second "shared subproject" test.

This time, process the subprojects in reverse order.

Signed-off-by: Hemmo Nieminen <hemmo.nieminen@iki.fi>
pull/100/head
Hemmo Nieminen 10 years ago committed by Jussi Pakkanen
parent 0747402e6a
commit 4952d2628e
  1. 13
      test cases/common/80 shared subproject 2/a.c
  2. 10
      test cases/common/80 shared subproject 2/meson.build
  3. 9
      test cases/common/80 shared subproject 2/subprojects/B/b.c
  4. 4
      test cases/common/80 shared subproject 2/subprojects/B/meson.build
  5. 3
      test cases/common/80 shared subproject 2/subprojects/C/c.c
  6. 2
      test cases/common/80 shared subproject 2/subprojects/C/meson.build

@ -0,0 +1,13 @@
#include<assert.h>
char func_b();
char func_c();
int main(int argc, char **argv) {
if(func_b() != 'b') {
return 1;
}
if(func_c() != 'c') {
return 2;
}
return 0;
}

@ -0,0 +1,10 @@
project('A', 'c')
C = subproject('C')
c = C.get_variable('c')
B = subproject('B')
b = B.get_variable('b')
a = executable('a', 'a.c', link_with : [b, c])
test('a test', a)

@ -0,0 +1,9 @@
#include<stdlib.h>
char func_c();
char func_b() {
if(func_c() != 'c') {
exit(3);
}
return 'b';
}

@ -0,0 +1,4 @@
project('B', 'c')
C = subproject('C')
c = C.get_variable('c')
b = shared_library('b', 'b.c', link_with : c)

@ -0,0 +1,2 @@
project('C', 'c')
c = shared_library('c', 'c.c')
Loading…
Cancel
Save