diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-12-26 13:24:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-26 13:24:30 +0200 |
commit | ac8d6087bfe1a2dacbd13d6cc9c4c526fc997fb5 (patch) | |
tree | fb443ccd4bdfa44670cc78a6b14b386cdf625a7a /test cases | |
parent | 1806aac37669fe5b4a50175b7b8298f119248be3 (diff) | |
parent | a5507404ab24c307b1ca5127b59e73759790746a (diff) | |
download | meson-ac8d6087bfe1a2dacbd13d6cc9c4c526fc997fb5.zip meson-ac8d6087bfe1a2dacbd13d6cc9c4c526fc997fb5.tar.gz meson-ac8d6087bfe1a2dacbd13d6cc9c4c526fc997fb5.tar.bz2 |
Merge pull request #2334 from mesonbuild/promotedep
Add functionality to promote nested dependencies to top level.
Diffstat (limited to 'test cases')
12 files changed, 51 insertions, 0 deletions
diff --git a/test cases/unit/13 promote/meson.build b/test cases/unit/13 promote/meson.build new file mode 100644 index 0000000..066cf36 --- /dev/null +++ b/test cases/unit/13 promote/meson.build @@ -0,0 +1,5 @@ +project('promotion test', 'c') + +subproject('s1') +subproject('s2') + diff --git a/test cases/unit/13 promote/subprojects/s1/meson.build b/test cases/unit/13 promote/subprojects/s1/meson.build new file mode 100644 index 0000000..88c467b --- /dev/null +++ b/test cases/unit/13 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/test cases/unit/13 promote/subprojects/s1/s1.c b/test cases/unit/13 promote/subprojects/s1/s1.c new file mode 100644 index 0000000..7d1d775 --- /dev/null +++ b/test cases/unit/13 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/test cases/unit/13 promote/subprojects/s1/subprojects/s3/meson.build b/test cases/unit/13 promote/subprojects/s1/subprojects/s3/meson.build new file mode 100644 index 0000000..894fe26 --- /dev/null +++ b/test cases/unit/13 promote/subprojects/s1/subprojects/s3/meson.build @@ -0,0 +1,4 @@ +project('s3', 'c') + +l = static_library('s3', 's3.c') + diff --git a/test cases/unit/13 promote/subprojects/s1/subprojects/s3/s3.c b/test cases/unit/13 promote/subprojects/s1/subprojects/s3/s3.c new file mode 100644 index 0000000..0166603 --- /dev/null +++ b/test cases/unit/13 promote/subprojects/s1/subprojects/s3/s3.c @@ -0,0 +1,3 @@ +int func2() { + return -42; +} diff --git a/test cases/unit/13 promote/subprojects/s1/subprojects/scommon/meson.build b/test cases/unit/13 promote/subprojects/s1/subprojects/scommon/meson.build new file mode 100644 index 0000000..231f275 --- /dev/null +++ b/test cases/unit/13 promote/subprojects/s1/subprojects/scommon/meson.build @@ -0,0 +1,4 @@ +project('scommon', 'c') + +clib = static_library('scommon', 'scommon_broken.c') + diff --git a/test cases/unit/13 promote/subprojects/s1/subprojects/scommon/scommon_broken.c b/test cases/unit/13 promote/subprojects/s1/subprojects/scommon/scommon_broken.c new file mode 100644 index 0000000..3665a9c --- /dev/null +++ b/test cases/unit/13 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/test cases/unit/13 promote/subprojects/s2/meson.build b/test cases/unit/13 promote/subprojects/s2/meson.build new file mode 100644 index 0000000..32bcf8f --- /dev/null +++ b/test cases/unit/13 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/test cases/unit/13 promote/subprojects/s2/s2.c b/test cases/unit/13 promote/subprojects/s2/s2.c new file mode 100644 index 0000000..2a6d1e6 --- /dev/null +++ b/test cases/unit/13 promote/subprojects/s2/s2.c @@ -0,0 +1,6 @@ +int func(); + + +int main(int argc, char **argv) { + return func() != 42; +} diff --git a/test cases/unit/13 promote/subprojects/s2/subprojects/athing.wrap b/test cases/unit/13 promote/subprojects/s2/subprojects/athing.wrap new file mode 100644 index 0000000..09ba4e8 --- /dev/null +++ b/test cases/unit/13 promote/subprojects/s2/subprojects/athing.wrap @@ -0,0 +1,2 @@ +The contents of this wrap file are never evaluated so they +can be anything. diff --git a/test cases/unit/13 promote/subprojects/s2/subprojects/scommon/meson.build b/test cases/unit/13 promote/subprojects/s2/subprojects/scommon/meson.build new file mode 100644 index 0000000..e0d8c7d --- /dev/null +++ b/test cases/unit/13 promote/subprojects/s2/subprojects/scommon/meson.build @@ -0,0 +1,4 @@ +project('scommon', 'c') + +clib = static_library('scommon', 'scommon_ok.c') + diff --git a/test cases/unit/13 promote/subprojects/s2/subprojects/scommon/scommon_ok.c b/test cases/unit/13 promote/subprojects/s2/subprojects/scommon/scommon_ok.c new file mode 100644 index 0000000..652f4eb --- /dev/null +++ b/test cases/unit/13 promote/subprojects/s2/subprojects/scommon/scommon_ok.c @@ -0,0 +1,3 @@ +int func() { + return 42; +} |