summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-06-16 19:23:35 -0400
committerEli Schwartz <eschwartz@archlinux.org>2022-06-17 14:33:02 -0400
commitb13a95c30156c0c9ebf11ceb664acee08a835b2c (patch)
tree5e32b069bfa309b804f1c0a54c8d599e35371fe6
parente99e55d0aa6209388ce76db42322b18006fbaaad (diff)
downloadmeson-b13a95c30156c0c9ebf11ceb664acee08a835b2c.tar.gz
docs: d_module_versions has an undocumented ability to accept integers
Dlang uses both integer version "levels" and arbitrary string identifiers, and we support both, but don't mention it in the docs. Also update a test case to pass one via declare_dependency. We already test this kwarg for build_target.
-rw-r--r--docs/markdown/D.md4
-rw-r--r--docs/yaml/functions/_build_target_base.yaml6
-rw-r--r--docs/yaml/functions/declare_dependency.yaml6
-rw-r--r--test cases/d/13 declare dep/meson.build2
4 files changed, 10 insertions, 8 deletions
diff --git a/docs/markdown/D.md b/docs/markdown/D.md
index 7ade5c85d..03d4047b7 100644
--- a/docs/markdown/D.md
+++ b/docs/markdown/D.md
@@ -95,7 +95,7 @@ my_lib = library('mylib',
install: true,
version: meson.project_version(),
soversion: project_soversion,
- d_module_versions: ['FeatureA', 'featureB']
+ d_module_versions: ['FeatureA', 'featureB', 1]
)
pkgc = import('pkgconfig')
@@ -104,7 +104,7 @@ pkgc.generate(name: 'mylib',
subdirs: 'd/mylib',
version: meson.project_version(),
description: 'A simple example D library.',
- d_module_versions: ['FeatureA']
+ d_module_versions: ['FeatureA', 1]
)
install_subdir('src/mylib/', install_dir: 'include/d/mylib/')
```
diff --git a/docs/yaml/functions/_build_target_base.yaml b/docs/yaml/functions/_build_target_base.yaml
index 6bce8ef0e..d299a854d 100644
--- a/docs/yaml/functions/_build_target_base.yaml
+++ b/docs/yaml/functions/_build_target_base.yaml
@@ -253,12 +253,14 @@ kwargs:
description: When set to true, the D modules are compiled in debug mode.
d_module_versions:
- type: list[str]
+ type: list[str | int]
description: List of module version identifiers set when compiling D sources.
d_debug:
type: list[str]
- description: List of module debug identifiers set when compiling D sources.
+ description: |
+ The [D version identifiers](https://dlang.org/spec/version.html#version) to add
+ during the compilation of D source files.
native:
type: bool
diff --git a/docs/yaml/functions/declare_dependency.yaml b/docs/yaml/functions/declare_dependency.yaml
index 51fde28db..752444785 100644
--- a/docs/yaml/functions/declare_dependency.yaml
+++ b/docs/yaml/functions/declare_dependency.yaml
@@ -59,11 +59,11 @@ kwargs:
pkg-config. *since 0.56.0* it can also be a list of `'key=value'` strings.
d_module_versions:
- type: str | list[str]
+ type: str | int | list[str | int]
since: 0.62.0
description: |
- a string or a list of strings,
- the D versions to add during the compilation of D source files
+ The [D version identifiers](https://dlang.org/spec/version.html#version) to add
+ during the compilation of D source files.
d_import_dirs:
type: list[inc | str]
diff --git a/test cases/d/13 declare dep/meson.build b/test cases/d/13 declare dep/meson.build
index 229393400..eef98162c 100644
--- a/test cases/d/13 declare dep/meson.build
+++ b/test cases/d/13 declare dep/meson.build
@@ -3,7 +3,7 @@ project('meson-d-sample', 'd',
)
my_dep = declare_dependency(
- d_module_versions: ['TestVersion'],
+ d_module_versions: ['TestVersion', 1],
d_import_dirs: include_directories('views'),
)