aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-11-27 00:32:34 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2017-11-27 23:22:47 +0200
commit5bc1009109431ad6f72d1ddfcf46ea718123a48b (patch)
treeafd03287883455c8bc8277b493c4a1999dab8897 /docs/markdown/snippets
parentdad5779d3c71d2d7474d481a4c4c2e48a1770c64 (diff)
downloadmeson-5bc1009109431ad6f72d1ddfcf46ea718123a48b.zip
meson-5bc1009109431ad6f72d1ddfcf46ea718123a48b.tar.gz
meson-5bc1009109431ad6f72d1ddfcf46ea718123a48b.tar.bz2
Add if_found kwarg to subdir().
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/if-found.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/markdown/snippets/if-found.md b/docs/markdown/snippets/if-found.md
new file mode 100644
index 0000000..a8d4932
--- /dev/null
+++ b/docs/markdown/snippets/if-found.md
@@ -0,0 +1,13 @@
+# Added `if_found` to subdir
+
+Added a new keyword argument to the `subdir` command. It is given a
+list of dependency objects and the function will only recurse in the
+subdirectory if they are all found. Typical usage goes like this.
+
+ d1 = dependency('foo') # This is found
+ d2 = dependency('bar') # This is not found
+
+ subdir('somedir', if_found : [d1, d2])
+
+In this case the subdirectory would not be entered since `d2` could
+not be found.