diff options
author | Hemmo Nieminen <hemmo.nieminen@iki.fi> | 2015-06-10 23:45:20 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-06-10 23:57:17 +0300 |
commit | b63281d37a9bf9448021d116ddfd9e69854f4dc5 (patch) | |
tree | 4f3be8e0f4062bda3dcb5ae45fa02747395ad731 | |
parent | af26390a9158dba09d9d0f3c0834d7355bce05af (diff) | |
download | meson-b63281d37a9bf9448021d116ddfd9e69854f4dc5.zip meson-b63281d37a9bf9448021d116ddfd9e69854f4dc5.tar.gz meson-b63281d37a9bf9448021d116ddfd9e69854f4dc5.tar.bz2 |
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>
4 files changed, 20 insertions, 0 deletions
diff --git a/test cases/common/84 extract subproject object/main.c b/test cases/common/84 extract subproject object/main.c new file mode 100644 index 0000000..0ada338 --- /dev/null +++ b/test cases/common/84 extract subproject object/main.c @@ -0,0 +1,5 @@ +int sub_lib_method(void); + +int main() { + return 1337 - sub_lib_method(); +} diff --git a/test cases/common/84 extract subproject object/meson.build b/test cases/common/84 extract subproject object/meson.build new file mode 100644 index 0000000..286aaa1 --- /dev/null +++ b/test cases/common/84 extract subproject object/meson.build @@ -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) diff --git a/test cases/common/84 extract subproject object/subprojects/sub_project/meson.build b/test cases/common/84 extract subproject object/subprojects/sub_project/meson.build new file mode 100644 index 0000000..e0073ea --- /dev/null +++ b/test cases/common/84 extract subproject object/subprojects/sub_project/meson.build @@ -0,0 +1,3 @@ +project('extract subproject object -- subproject', 'c') + +lib = shared_library('sub_lib', 'sub_lib.c') diff --git a/test cases/common/84 extract subproject object/subprojects/sub_project/sub_lib.c b/test cases/common/84 extract subproject object/subprojects/sub_project/sub_lib.c new file mode 100644 index 0000000..be3c9aa --- /dev/null +++ b/test cases/common/84 extract subproject object/subprojects/sub_project/sub_lib.c @@ -0,0 +1,3 @@ +int sub_lib_method() { + return 1337; +} |