diff options
| author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-05-07 02:01:41 +0530 |
|---|---|---|
| committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-05-09 14:23:15 +0530 |
| commit | c7d71c79434d98c280121ac1a20faca8fd512e40 (patch) | |
| tree | 14fa2b546a8331fb55dc1aa436dacd49a64c7eb5 /test cases/linuxlike/5 dependency versions | |
| parent | bf54383d8aabd076a5893a3e849fd6788db77054 (diff) | |
| download | meson-c7d71c79434d98c280121ac1a20faca8fd512e40.tar.gz | |
dependencies: Fix caching of native/cross dependencies
All our cached_dep magic was totally useless since we ended up using
the same identifier for native and cross deps. Just nuke all this
cached_dep code since it is very error-prone and improve the
identifier generation instead.
For instance, this is broken *right now* with the `type_name` kwarg.
Add a bunch of tests to ensure that all this actually works...
Closes https://github.com/mesonbuild/meson/issues/1736
Diffstat (limited to 'test cases/linuxlike/5 dependency versions')
| -rw-r--r-- | test cases/linuxlike/5 dependency versions/meson.build | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test cases/linuxlike/5 dependency versions/meson.build b/test cases/linuxlike/5 dependency versions/meson.build index 1b01cd6b1..cc33b2ffa 100644 --- a/test cases/linuxlike/5 dependency versions/meson.build +++ b/test cases/linuxlike/5 dependency versions/meson.build @@ -48,6 +48,16 @@ fakezlib_dep = dependency('zlib', fallback : ['somelib', 'fakezlib_dep']) assert(fakezlib_dep.type_name() == 'internal', 'fakezlib_dep should be of type "internal", not ' + fakezlib_dep.type_name()) +if meson.is_cross_build() + # Test caching of native and cross dependencies + # https://github.com/mesonbuild/meson/issues/1736 + cross_prefix = dependency('zlib').get_pkgconfig_variable('prefix') + native_prefix = dependency('zlib', native : true).get_pkgconfig_variable('prefix') + assert(cross_prefix != '', 'cross zlib prefix is not defined') + assert(native_prefix != '', 'native zlib prefix is not defined') + assert(native_prefix != cross_prefix, 'native prefix == cross_prefix == ' + native_prefix) +endif + foreach d : ['sdl2', 'gnustep', 'wx', 'gl', 'python3', 'boost', 'gtest', 'gmock'] dep = dependency(d, required : false) if dep.found() |
