aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/D.md
diff options
context:
space:
mode:
authorAri Vuollet <GoaLitiuM@users.noreply.github.com>2018-08-18 23:16:06 +0300
committerGoaLitiuM <goalitium@kapsi.fi>2018-09-27 17:49:48 +0300
commitc4b885bfd18cda9578409fa67d986151b32e7afd (patch)
treed2803cf70fe4b4ab839cd5628ec49698bd5c0fef /docs/markdown/D.md
parent389f012ed29b0c30e6bde178db8d810e8963af14 (diff)
downloadmeson-c4b885bfd18cda9578409fa67d986151b32e7afd.zip
meson-c4b885bfd18cda9578409fa67d986151b32e7afd.tar.gz
meson-c4b885bfd18cda9578409fa67d986151b32e7afd.tar.bz2
docs: Document conditional debug compilation flags [skip ci]
Diffstat (limited to 'docs/markdown/D.md')
-rw-r--r--docs/markdown/D.md10
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/markdown/D.md b/docs/markdown/D.md
index 15de2f7..2b0eaac 100644
--- a/docs/markdown/D.md
+++ b/docs/markdown/D.md
@@ -14,15 +14,21 @@ project('myapp', 'd')
executable('myapp', 'app.d')
```
-## Compiling different versions
+## [Conditional compilation](https://dlang.org/spec/version.html)
-If you are using the [version()](https://dlang.org/spec/version.html) feature for conditional compilation,
+If you are using the [version()](https://dlang.org/spec/version.html#version-specification) feature for conditional compilation,
you can use it using the `d_module_versions` target property:
```meson
project('myapp', 'd')
executable('myapp', 'app.d', d_module_versions: ['Demo', 'FeatureA'])
```
+For debugging, [debug()](https://dlang.org/spec/version.html#debug) conditions are compiled automatically in debug builds, and extra identifiers can be added with the `d_debug` argument:
+```meson
+project('myapp', 'd')
+executable('myapp', 'app.d', d_debug: [3, 'DebugFeatureA'])
+```
+
## Using embedded unittests
If you are using embedded [unittest functions](https://dlang.org/spec/unittest.html), your source code needs