aboutsummaryrefslogtreecommitdiff
path: root/docs/yaml/functions
AgeCommit message (Collapse)AuthorFilesLines
2023-03-01docs: document default_options behaviourJohn Levon1-0/+5
As discussed in issue #8037, using `c_args` in `project()` leads to `CFLAGS` not being respected, which is a common mistake. Document this and suggest using `add_project_arguments()` instead. Signed-off-by: John Levon <levon@movementarian.org>
2023-03-01docs: fix a small typoJohn Levon1-1/+1
s/Accecpts/Accepts/ Signed-off-by: John Levon <levon@movementarian.org>
2023-02-15docs: add description of license_files kwargEli Schwartz1-0/+16
Added in commit 2fa074917597fea0cf3332c6620d3414034825e4 but I forgot to document it.
2023-02-10docs: Add cython to the languages accepted by project()Daniele Nicolodi1-2/+3
Fixes #11373.
2023-01-04document declare_dependency(object: ...)Paolo Bonzini1-0/+7
2023-01-04allow passing generated objects in the "objects" keyword argumentPaolo Bonzini1-2/+5
Generated objects can already be passed in the "objects" keyword argument as long as you go through an extract_objects() indirection. Allow the same even directly, since that is more intuitive than having to add them to "sources". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-12-21fix build_target(objects: ...) documentationPaolo Bonzini1-4/+4
The documentation for build_target(...) does not list file or str as the possible types for the "objects" keyword argument, even though in theory the argument is meant for prebuild object files that are part of the sources. Of course that is only the theory, because an ExtractedObjects object is probably used a lot more than a file in the source tree. But at least make the reference manual's typing information accurate.
2022-12-14docs: clarify the semantics of the required: kwarg everywhereEli Schwartz2-4/+14
Link to feature options consistently, and point out that it controls "whether" the function finds what it's trying to find. This clues people in to the fact that disabled features exist.
2022-12-14docs: simplify the documentation on required kwarg for subprojectEli Schwartz1-4/+1
It's a clone of dependency() anyway.
2022-11-11Fix typo in dependency() 'names' docstring [skip ci]Will Thompson1-1/+1
2022-10-24Add missing since annotations in docsElliott Sales de Andrade3-2/+5
This is based on searching for `@FeatureNew*` decorators. There is also one correction to a version in a decorators; `build_by_default` was added in #1303, which is 0.38.0, not 0.40.0.
2022-10-23Fix typos in docsElliott Sales de Andrade6-7/+7
2022-10-22doc: Fix linkZhao, Gang1-1/+1
2022-10-10Document and test new WrapDB auto fallbackXavier Claessens1-0/+5
2022-08-29docs: make note of the path restriction on subdir()Eli Schwartz1-1/+4
It's mentioned in the error message if you try to do it, that you cannot use `..`, but it is probably useful to mention this in the online docs too.
2022-07-31documentation: extend custom_target installGerion Entrup1-2/+3
custom_target allows selective installation if it outputs more than one file. Mention this explicitly in install. Additionally, fix the types for install_dir. see: https://github.com/mesonbuild/meson/issues/505
2022-07-08implement the new preserve_path kwarg for install_data tooEli Schwartz1-0/+9
Primarily interesting to me because it is then available for the python module's install_sources method. Based on the new feature in install_headers.
2022-06-17docs: d_module_versions has an undocumented ability to accept integersEli Schwartz2-5/+7
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.
2022-06-17docs: fix incorrect info for declare_dependency sourcesEli Schwartz1-1/+1
The type information is clearly wrong as it disagrees with the description w.r.t. generated headers. We also rely on it accepting custom targets for the obvious reason that we accept it in a build target too! In fact, we rely on this in the testsuite too.
2022-05-31Fix typo in documentation for add_*_argumentsKarl Linden2-2/+2
2022-05-30Implement `preserve_path` for install_headersFlorian "sp1rit"​1-0/+16
The `install_headers` function now has an optional argument `preserve_path` that allows installing multi-directory headerfile structures that live alongside sourcecode with a single command. For example, the headerfile structure headers = [ 'one.h', 'two.h', 'alpha/one.h', 'alpha/two.h', 'alpha/three.h' 'beta/one.h' ] can now be passed to `install_headers(headers, subdir: 'mylib', preserve_path: true)` and the resulting directory tree will look like {prefix} └── include    └── mylib       ├── alpha       │   ├── one.h       │   ├── two.h       │   └── three.h       ├── beta       │   └── one.h       ├── one.h       └── two.h Fixes #3371
2022-05-03interpreter: new function add_project_dependencies()Paolo Bonzini1-0/+16
This function can be used to add fundamental dependencies such as glib to all build products in one fell swoop. This can be useful whenever, due to a project's coding conventions, it is not really possible to compile any source file without including the dependency. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-02complete documentation of declare_dependencyRemi Thebault1-0/+14
2022-05-02docs: correct incorrect types for pch filesEli Schwartz1-1/+1
In the original RefMan 2.0 implementation, the types for this were filled in as `str | file`, but the code only ever accepted the former. Fix the documentation so that it aligns with reality. Fixes #10338
2022-04-20vcs_tag: handle non-str / non-file argumentsKirill Isakov1-1/+3
This makes vcs_tag behave like other commands so it accepts not only string and file arguments, but also exe, custom_tgt, and external_program.
2022-04-20vcs_tag: document the already supported file argKirill Isakov1-1/+3
2022-04-07docs: YAML: Add `arg_flattening: false` where requiredDaniel Mensinger7-0/+14
2022-04-01docs: fix inaccurate description of command targetsEli Schwartz2-2/+2
It isn't possible to have one target depend on a run_target, because those produce no outputs and are always out of date. But the docs didn't specify which types of target are valid here. Correct the docs to align with the implementation. Fixes #10198
2022-03-31docs: note that find_program accepts file objectsEli Schwartz1-4/+6
This was implemented in commit 280346da3ac5904ec097afe89ef45ad34bd4a173 but never properly documented (it predated the version-controlled docs).
2022-03-31docs: correct documentation of shared_library soversionsEli Schwartz1-2/+2
We have always accepted an int here as an alternative to a string, but the initial documentation thought it was only a string.
2022-03-30Add new debug() functionMarvin Scholz1-0/+14
Adds a new debug() function that can be used in the meson.build to log messages to the meson-log.txt that will not be printed to stdout when configuring the project.
2022-03-24Make compilers list per subprojectXavier Claessens1-1/+1
Previously subprojects inherited languages already added by main project, or any previous subproject. This change to have a list of compilers per interpreters, which means that if a subproject does not add 'c' language it won't be able to compile .c files any more, even if main project added the 'c' language. This delays processing list of compilers until the interpreter adds the BuildTarget into its list of targets. That way the interpreter can add missing languages instead of duplicating that logic into BuildTarget for the cython case.
2022-03-22Fix missing ' in custom_target docsrusty-snake1-2/+2
2022-03-22Add ability to add resources to jarsTristan Partin1-0/+4
Previously Meson lacked the ability to add resources to jar files. Fixes #9945
2022-03-20docs: fix incorrect default for test is_parallelEli Schwartz1-1/+1
In the original RefMan 2.0 implementation, this incorrectly started claiming that the default is false. Fixes #10155
2022-03-13Merge pull request #9339 from dcbaker/submit/structured_sourcesJussi Pakkanen2-1/+22
Structured Sources
2022-03-07docs: document the rust_crate_type build_target keywordDylan Baker1-0/+20
2022-03-07docs: Add docs for structured_sourcesDylan Baker2-1/+22
2022-03-02document and raise an error for disallowed combination of install_headers argsEli Schwartz1-2/+5
It makes no sense to specify both: - install_dir, which overrides the -Dincludedir= builtin option - subdir, which suffixes the -Dincludedir= builtin option We've always silently ignored the subdir in this case, which is really surprising if someone actually passed it and expected it to do something. We also confusingly didn't say anything in the documentation about it. Document that the options are incompatible, and explicitly check to see if they are both passed -- if so, raise an error message pointing out that only install_dir should be used. Fixes #10046
2022-02-28Allow setting method/separator in environment() and meson.add_devenv()Xavier Claessens1-1/+22
2022-02-20add all supported arguments in docs for summary()Stone Tickle1-5/+28
2022-02-14shared module: Allow linking on AndroidNirbheek Chauhan1-5/+11
Android requires shared modules that use symbols from other shared modules to be linked before they can be dlopen()ed in the correct order. Not doing so leads to a missing symbol error: https://github.com/android/ndk/issues/201 We need to always allow linking for this. Also add a soname, although it's not confirmed that it's needed, and it doesn't really hurt if it isn't needed.
2022-02-09meson: Allow directory options outside of prefixJan Tojnar2-14/+12
This bring us in line with Autotools and CMake and it is useful for platforms like Nix, which install projects into multiple independent prefixes. As a consequence, `get_option` might return absolute paths for some directory options, if a directory outside of prefix is passed. This is technically a backwards incompatible change but its effect should be minimal, thanks to widespread use of `join_paths`/`/` operator and pkg-config generator module. It should only cause an issue when a path were constructed by concatenating the value of directory path option. Also remove a comment about commonpath since we do not use that since <https://github.com/mesonbuild/meson/commit/00f5dadd5b7d71c30bd7393d165a87f554eb92e5>. Fixes: https://github.com/mesonbuild/meson/issues/2561
2022-02-03docs: strongly recommend the use of SPDX instead of array of licenseDylan Baker1-9/+17
The array of licenses is not clear, where and SPDX expression using AND and OR is very clear, take for example this: `['Apache', 'GPLv2']`. What does that mean? Any Apache license you like and GPLv2? Using a valid SPDX license identifier however makes it extremely clear what is meant: `'Apache-2.0 OR GPL-2.0-only'`. It is very clear that you mean, "this is Apache 2.0, however, you can use as GPL-2.0 for the purpose of linking it into your GPL-2.0 project".
2022-02-01interpreter: support for forcibly verbose logging of some testsPaolo Bonzini2-0/+15
Add a new keyword argument to test() and benchmark(), completing the implementation of the feature. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-01-29docs: find_program can return the current Python3 interpreterAndrea Pappacoda1-1/+3
This was the case since 067ff7eeae26eda8edc9f7f7432f551c3e373eaa, i.e. version 0.50.0. Fixes #3856
2021-12-08docs: Add the `configuration` keyword argument to `configure_File`Dylan Baker1-0/+7
We were missing the most important keyword argument of them all!
2021-12-01add install_symlink functionPablo Correa Gómez1-0/+34
Allows installing symlinks directly from meson, which can become useful in multiple scenarios. Current main use is to help moving forward #9557
2021-11-29docs: add missing argument documentation for run_command captureDylan Baker1-0/+9
2021-11-24shared_module: Add soname when used as a link targetNirbheek Chauhan2-7/+9
Emit a detailed deprecation warning that explains what to do instead. Also add a unittest. ``` DEPRECATION: target prog links against shared module mymod, which is incorrect. This will be an error in the future, so please use shared_library() for mymod instead. If shared_module() was used for mymod because it has references to undefined symbols, use shared_libary() with `override_options: ['b_lundef=false']` instead. ``` Fixes https://github.com/mesonbuild/meson/issues/9492