summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2016-10-27 21:16:16 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2016-11-02 13:49:57 -0700
commitaeaccdc418e9e12bf64b5b3bd21751e0e71c7c2b (patch)
tree28b013ce74f4259777f8990fcd748e3d5a8d86f5 /test cases
parentf1c909c41a1e495c08784aefdaa7779c1bb440d3 (diff)
downloadmeson-aeaccdc418e9e12bf64b5b3bd21751e0e71c7c2b.tar.gz
Fix dependency() ignoring required attribute when checked second or third time
If first checking for a dependency as not-required, and then later checking for the same dependency again as required, we would not error out saying the dependency is missing, but just silently re-use the cached dependency object from the first check and then likely fail at build time if the dependency is not actually there. With test case. Fixes #964.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/failing/34 dependency not-required then required/meson.build4
1 files changed, 4 insertions, 0 deletions
diff --git a/test cases/failing/34 dependency not-required then required/meson.build b/test cases/failing/34 dependency not-required then required/meson.build
new file mode 100644
index 000000000..f33c41c06
--- /dev/null
+++ b/test cases/failing/34 dependency not-required then required/meson.build
@@ -0,0 +1,4 @@
+project('dep-test', 'c', version : '1.0')
+
+foo_dep = dependency('foo-bar-xyz-12.3', required : false)
+bar_dep = dependency('foo-bar-xyz-12.3', required : true)