diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-12-18 01:17:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-18 01:17:27 +0200 |
commit | 3122bac28a1e047da28b0190b8a0610cc26028dc (patch) | |
tree | ae4d0edb64d53f8e729bc586a6038286cedb215b /docs/markdown/snippets | |
parent | a2a9611e1de9313770cc2ef8d6a363da6d8eb6dc (diff) | |
parent | a4bb0928e30ac6464a8ef5003df43233d61d6bdf (diff) | |
download | meson-3122bac28a1e047da28b0190b8a0610cc26028dc.zip meson-3122bac28a1e047da28b0190b8a0610cc26028dc.tar.gz meson-3122bac28a1e047da28b0190b8a0610cc26028dc.tar.bz2 |
Merge pull request #4649 from dcbaker/summary-function
Add a summary() function for configuration summarization
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r-- | docs/markdown/snippets/summary.md | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/docs/markdown/snippets/summary.md b/docs/markdown/snippets/summary.md new file mode 100644 index 0000000..c5d64fd --- /dev/null +++ b/docs/markdown/snippets/summary.md @@ -0,0 +1,37 @@ +## Add a new summary() function + +A new function [`summary()`](Reference-manual.md#summary) has been added to +summarize build configuration at the end of the build process. + +Example: +```meson +project('My Project', version : '1.0') +summary('Directories', {'bindir': get_option('bindir'), + 'libdir': get_option('libdir'), + 'datadir': get_option('datadir'), + }) +summary('Configuration', {'Some boolean': false, + 'Another boolean': true, + 'Some string': 'Hello World', + 'A list': ['string', 1, true], + }) +``` + +Output: +``` +My Project 1.0 + + Directories + prefix: /opt/gnome + bindir: bin + libdir: lib/x86_64-linux-gnu + datadir: share + + Configuration + Some boolean: False + Another boolean: True + Some string: Hello World + A list: string + 1 + True +``` |