Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
s/Accecpts/Accepts/
Signed-off-by: John Levon <levon@movementarian.org>
|
|
Added in commit 2fa074917597fea0cf3332c6620d3414034825e4 but I forgot to
document it.
|
|
Fixes #11373.
|
|
|
|
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>
|
|
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.
|
|
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.
|
|
It's a clone of dependency() anyway.
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
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
|
|
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>
|
|
|
|
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
|
|
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.
|
|
|
|
|
|
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
|
|
This was implemented in commit 280346da3ac5904ec097afe89ef45ad34bd4a173
but never properly documented (it predated the version-controlled docs).
|
|
We have always accepted an int here as an alternative to a string, but
the initial documentation thought it was only a string.
|
|
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.
|
|
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.
|
|
|
|
Previously Meson lacked the ability to add resources to jar files.
Fixes #9945
|
|
In the original RefMan 2.0 implementation, this incorrectly started
claiming that the default is false.
Fixes #10155
|
|
Structured Sources
|
|
|
|
|
|
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
|
|
|
|
|
|
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.
|
|
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
|
|
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".
|
|
Add a new keyword argument to test() and benchmark(), completing the
implementation of the feature.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This was the case since 067ff7eeae26eda8edc9f7f7432f551c3e373eaa, i.e.
version 0.50.0. Fixes #3856
|
|
We were missing the most important keyword argument of them all!
|
|
Allows installing symlinks directly from meson, which can
become useful in multiple scenarios. Current main use is to
help moving forward #9557
|
|
|
|
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
|