aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-10-02 21:49:29 +0300
committerGitHub <noreply@github.com>2018-10-02 21:49:29 +0300
commite6395c6f44fb0fcf2d388dcf3aca8ee22c6d32f2 (patch)
tree8c5dcc0052cc54c7ae57947359aac59e7d444268 /docs
parent829d7bf6f9c696b526c9c0f99635634389dd1b5d (diff)
parentc4b885bfd18cda9578409fa67d986151b32e7afd (diff)
downloadmeson-e6395c6f44fb0fcf2d388dcf3aca8ee22c6d32f2.zip
meson-e6395c6f44fb0fcf2d388dcf3aca8ee22c6d32f2.tar.gz
meson-e6395c6f44fb0fcf2d388dcf3aca8ee22c6d32f2.tar.bz2
Merge pull request #4051 from GoaLitiuM/d-debug
D: Add conditional debug compilation flags
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