Add a test for object extraction from subprojects.

Commit ff51f2196f broke object extraction from subprojects. Add a new test case
to ensure this doesn't happen again.

Signed-off-by: Hemmo Nieminen <hemmo.nieminen@iki.fi>
pull/145/head
Hemmo Nieminen 10 years ago committed by Jussi Pakkanen
parent af26390a91
commit b63281d37a
  1. 5
      test cases/common/84 extract subproject object/main.c
  2. 9
      test cases/common/84 extract subproject object/meson.build
  3. 3
      test cases/common/84 extract subproject object/subprojects/sub_project/meson.build
  4. 3
      test cases/common/84 extract subproject object/subprojects/sub_project/sub_lib.c

@ -0,0 +1,5 @@
int sub_lib_method(void);
int main() {
return 1337 - sub_lib_method();
}

@ -0,0 +1,9 @@
project('extract subproject object', 'c')
sub = subproject('sub_project')
lib = sub.get_variable('lib')
exe = executable('exe', 'main.c',
objects : lib.extract_objects('sub_lib.c'))
test('extraction test', exe)

@ -0,0 +1,3 @@
project('extract subproject object -- subproject', 'c')
lib = shared_library('sub_lib', 'sub_lib.c')
Loading…
Cancel
Save