aboutsummaryrefslogtreecommitdiff
path: root/docs
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
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')
-rw-r--r--docs/markdown/D.md10
-rw-r--r--docs/markdown/Reference-manual.md3
2 files changed, 10 insertions, 3 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
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 7902f19..3bd2bfa 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -537,7 +537,8 @@ be passed to [shared and static libraries](#library).
- `d_import_dirs` list of directories to look in for string imports used
in the D programming language
- `d_unittest`, when set to true, the D modules are compiled in debug mode
-- `d_module_versions` list of module versions set when compiling D sources
+- `d_module_versions` list of module version identifiers set when compiling D sources
+- `d_debug` list of module debug identifiers set when compiling D sources
The list of `sources`, `objects`, and `dependencies` is always
flattened, which means you can freely nest and add lists while