Age | Commit message (Collapse) | Author | Files | Lines |
|
Avoids errors like
`ERROR: Invalid variable name: 16bit_arithmetic_dir`.
|
|
Currently, when using frameworks on MacOS systems, Meson will send the appropriate flags to the linker but fails to pass flags to the compiler, resulting in the headers not being found for the included frameworks.
This patch adds the required "-F{framework}" flag to the compiler options, so that the compiler can find the headers of included frameworks.
See: https://github.com/mesonbuild/meson/issues/14641
|
|
These were supported for shared libraries, but for static libraries
the link_with property was never populated with `LINK_LIBRARIES` or
`INTERFACE_LINK_LIBRARIES`.
Fixes #13101
|
|
The most egregious cases are Nasm (which needs to be transformed to `ASM_NASM`) and Rust (which is not yet supported by CMake).
See https://cmake.org/cmake/help/v4.0/command/project.html
|
|
Don't add "<project_source_dir>/<subproject>/__CMake_build" directory
to include directories.
Fixes #12351
|
|
|
|
This is required to resolve ambiguous LINK_LIBRARIES passed as bare
names.
|
|
This will be used by rustdoc tests because the Test objects takes a
single string for the command and everything else goes in the args.
But apart from this, the need to split the executable from the
arguments is common so create new methods to do it.
While at it, fix brokenness in the handling of the zig compiler, which
is checking against "zig" but failing to detect e.g. "/usr/bin/zig".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This is an old method, that is now just a wrapper around the OptionStore
method, that doesn't add any value. It's also an option related method
attached to the CoreData instead of the OptionStore, so useless and a
layering violation.
|
|
|
|
This will allow us to take choices out of the UserOption class, which
doesn't actually use this attribute.
|
|
|
|
ref: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9875
|
|
This setting is for things like `ccache`, but if Meson treats zig that
way, then it will expand the second argument to become:
```
/usr/bin/zig /usr/lib64/ccache/cc
```
in CMake and `/usr/lib64/ccache/cc` is _not_ an argument to `zig`.
If you run
```
$ CC='zig cc' CXX='zig c++' ./meson.py setup 'test cases/cmake/1 basic' build
```
then CMake will fail to compile a "simple test program" and setup
fails.
|
|
|
|
|
|
|
|
We've documented these lists as being `List[Path]`, but then we have the
potential to insert a None into them via the `rel_path()` function,
which can return `None` in some cases. Currently we fix some (but not
all) of these later, but we should actually remove them from the list
before we assign, so that it's actually a `List[Path]` at all times.
While we're here I've simplified the logic a bit.
Closes: #13551
|
|
|
|
It may have all been correct, but mypy and pyright couldn't be sure of
that.
|
|
Co-Authored-By: L. E. Segovia <amy@amyspark.me>
|
|
It's always true because the func is always a real, truthy func object.
In the cmake case, the logic seems to be broken because if a path is not
a file, then that includes the case where it does not exist. It also
clearly meant "or" instead of "and".
What actually ended up happening was that this check never fired at all.
Because "if not func and not ..." would always fail, because "not func"
is always false. Maybe we don't need this logic at all...
|
|
|
|
CMake has two target properties, LINK_OPTIONS and INTERFACE_LINK_OPTIONS.
The former is for link flags that apply only to the target (PRIVATE).
The latter is used for link flags that propagate to dependents (PUBLIC
or INTERFACE). Meson currently propagates all flags, PUBLIC and PRIVATE,
as part of the generated dependency() which causes problems when some of
the private flags are highly disruptive, e.g. `-Wl,--version-script`.
Tease apart the two kinds of link flags and, for non-static libraries,
only propagate the PUBLIC/INTERFACE flags and not the PRIVATE ones.
|
|
|
|
* Explicitly look for 'OpenAL' with method: 'cmake'
This test was added for testing cmake depenencies,
so no other method must be accepted here, and
the spelling must match FindOpenAL.cmake.
* Resolve frameworks in IMPORTED_LOCATION
The IMPORTED_LOCATION property of CMake targets may contain macOS
framework paths. These must be processed into flags. By putting the
values in the list of targets, they will be processed as if they
appeared in INTERFACE_LINK_LIBRARIES.
|
|
|
|
|
|
|
|
|
|
Fixes #12160
|
|
GENERATED files can be used as dependencies for other targets, so it's
misguided (at best) to filter them with a blunt whitelist.
However, there does exist an extension that needs to be skipped: on Windows +
MSVC, CMake will by default try to generate a Visual Studio project, and
there dependencies with no inputs are instead tied to a dummy .rule
input file which is created by the generation step. The fileapi will
still report those, so it will cause Meson to bail out when it realises
there's no such file in the build tree.
Fixes #11607
|
|
Which mypy is suddenly complaining about.
|
|
This replaces all of the Apache blurbs at the start of each file with an
`# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing
uses to be consistent in capitalization, and to be placed above any
copyright notices.
This removes nearly 3000 lines of boilerplate from the project (only
python files), which no developer cares to look at.
SPDX is in common use, particularly in the Linux kernel, and is the
recommended format for Meson's own `project(license: )` field
|
|
This properly sets the project version in projects meson generates from
cmake projects. This allows dependency fallbacks to properly check the
version constraints in dependency calls when falling back to a cmake
subproject. Before this would fail, because the project version was
undefined.
|
|
I'm not 100% sure that warning is the appropriate action, but it's
better than failing with a backtrace.
Fixes: #12555
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use separate Node for multiline strings
|
|
|
|
Performed using https://github.com/ilevkivskyi/com2ann
This has no actual effect on the codebase as type checkers (still)
support both and negligible effect on runtime performance since
__future__ annotations ameliorates that. Technically, the bytecode would
be bigger for non function-local annotations, of which we have many
either way.
So if it doesn't really matter, why do a large-scale refactor? Simple:
because people keep wanting to, but it's getting nickle-and-dimed. If
we're going to do this we might as well do it consistently in one shot,
using tooling that guarantees repeatability and correctness.
Repeat with:
```
com2ann mesonbuild/
```
|
|
These annotations all had a default initializer of the correct type, or
a parent class annotation.
|
|
|
|
|
|
We should try to figure out what is a cross-submodule object and what
isn't.
|
|
It's shorter and more descriptive. Although we always enforce the same
rules either way, a unified decorator is one less line of code for each
location, and also tells you how many "too few" arguments you *did*
pass.
|