diff options
| author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-02-06 18:11:29 +0000 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-02-08 00:35:38 +0200 |
| commit | 7bfcf68777f5bee3cab95685acf3c4177f6b6498 (patch) | |
| tree | cd8bcc2ec6c0750434fc4f437744fcec6a59223c /test cases/linuxlike | |
| parent | 2b0973acd90cd1ff7db7369d5118363a2eaea51e (diff) | |
| download | meson-7bfcf68777f5bee3cab95685acf3c4177f6b6498.tar.gz | |
Add get_pkgconfig_variable(default:)
Also use that to squelch the warning for internal uses which handle the
variable missing case (just gnome at the moment)
A follow up to PR #2914
Diffstat (limited to 'test cases/linuxlike')
| -rw-r--r-- | test cases/linuxlike/1 pkg-config/meson.build | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test cases/linuxlike/1 pkg-config/meson.build b/test cases/linuxlike/1 pkg-config/meson.build index 30e5d2508..17ee19256 100644 --- a/test cases/linuxlike/1 pkg-config/meson.build +++ b/test cases/linuxlike/1 pkg-config/meson.build @@ -17,6 +17,8 @@ test('zlibtest', exe) zprefix = dep.get_pkgconfig_variable('prefix') # Always set but we can't be sure what the value is. # pkg-config returns empty string for not defined variables assert(dep.get_pkgconfig_variable('nonexisting') == '', 'Value of unknown variable is not empty.') +# ... unless default: is used +assert(dep.get_pkgconfig_variable('nonexisting', default: 'foo') == 'foo', 'Value of unknown variable is not defaulted.') # pkg-config is able to replace variables assert(dep.get_pkgconfig_variable('prefix', define_variable: ['prefix', '/tmp']) == '/tmp', 'prefix variable has not been replaced.') |
