Dylan Baker
d636b92c1a
install_*: FileMode doesn't need to be None
...
There's no reason to allow None into the backend, it already has code to
check that all of the values of the FileMode object are None, so let's
use that, which is much simpler all the way down.
3 years ago
Dylan Baker
7213b7d81f
interpreter: use typed_kwargs for install_man
3 years ago
Dylan Baker
7619f31f71
interpreter: man sections can be up to 9 on many platforms
...
Linux and FreeBSD use section 9 for kernel man pages, so we should allow
that.
3 years ago
Dylan Baker
9611bd8244
interpreter: use typed_pos_args for install_man
3 years ago
Dylan Baker
f4d2efbed3
interpreter: use typed_kwargs for install_headers
3 years ago
Dylan Baker
251dff56fb
interpreter: use typed_pos_args for install_headers
3 years ago
Dylan Baker
ea3d85a1c0
interpreter: use typed_kwargs for install_data
3 years ago
Dylan Baker
a551e76137
interpreter: use typed_pos_args for install_data
3 years ago
Dylan Baker
596c8d4af5
interpreter: use typed_kwargs for install_subdir
3 years ago
Dylan Baker
3d940fec98
interpreter: use typed_pos_args for install_subdir
3 years ago
Dylan Baker
dd296f321b
interpreterbase: Add evolve to KwargInfo
...
This works just like OptionKey.evolve, pass new keyword arguments to
override old ones, otherwise the original versions are copied to the new
one.
3 years ago
Dylan Baker
a024f432dd
interpreter: add overload for source_strings_to_files
...
when only passing strings or Files we only get back Files. This is
useful for the install_* methods
3 years ago
Dylan Baker
f276b2349a
mesonlib: add rsplit and and maxsplit
...
Since string has a maxsplit as well, we should implement that for
polymorphism
3 years ago
Dylan Baker
86da131129
mesonlib: Fix FileMode type annotations
3 years ago
Dylan Baker
5d3a60ae65
minstall: fix type annotation for add_arguments
...
This takes an `argparse.ArgumentParser` instance, not a namespace
3 years ago
Dylan Baker
f2ad5e377e
backend: Headers.install_subdir is allowed to be None
...
But we don't properly handle that.
3 years ago
Jon Turney
bee4dc9f78
Fix project tests category name used in skippable() and XML output
...
Since 25df6e7d
split the iteration over tests to start them from the
iteration to collect their results, the variable 'name' is only being
set in the first iteratiorn, so all tests are treated as being in the
last test category read (probably 'wasm') for skipppable() and in the
XML output.
Store the category name in the TestDef object
Use it in skippable()
Use it in classname attribute of XML test results
3 years ago
Paolo Bonzini
bd75e0398f
extract_objects: skip headers when building custom_target command line
...
As seen in the testcase, passing objects to custom_target does not work
if headers are passed extract_objects(), or if extract_all_objects() is used
and the sources include any header files. To fix this, use the code that
already exists for unity build to filter out the nonexistent ".h.o" files.
This already gives for free the handling of genlist, which was mentioned
in a TODO comment.
3 years ago
Justin Handville
5650c9b769
Fixed unused-parameter/strict-prototypes warnings.
3 years ago
Justin Handville
ee240b60b8
Added test case to test fix for issue 8910.
3 years ago
Justin Handville
e8e03cdc72
Fixed style issue as per comments on PR 8911.
3 years ago
Justin Handville
9f248c778d
Fix for Issue 8910 (Meson filters CMake asm files)
3 years ago
Paolo Bonzini
a656febccf
extract_objects: test and document using the result in a custom_target
...
QEMU would like to use the result of extract_objects in a custom_target;
examples are using objcopy, or using the object files as the key to look
up command line arguments in compile_commands.json. This is slightly
peculiar and not covered by the test suite, but it works; in order to avoid
regressions, add a test case and document it.
3 years ago
Laurin-Luis Lehning
281f5abee3
interpreter: Replace manual kwarg validation in compiler.get_supported_arguments with @typed_kwargs
3 years ago
Daniel Mensinger
5cd9f88d6c
fix: Ensure that build targets have all methods from ExternalProgram
...
As a side-effect from #8885 `find_program()` returns now `Executable`
objects when `meson.override_find_program` is called with an
executable target. To resolve this conflict the missing methods
from `ExternalProgram` are added to `BuildTarget`.
3 years ago
Laurin-Luis Lehning
d5ed8f61a5
interpreter: Move argument checks from add_*_arguments to compiler.get_supported_arguments
3 years ago
Laurin-Luis Lehning
377adfb6fb
docs: Fix snippet heading for required project arguments
3 years ago
Laurin-Luis Lehning
e44587fc73
interpreter: Consider the compiler language before checking arguments
3 years ago
Laurin-Luis Lehning
c9ad98ef5e
interprter: Add required kwarg to add_(project|global)_arguments
...
To avoid manual compiler support checks add_project_arguments and
add_global_arguments receive a new keyword argument to perform
them automatically.
3 years ago
Daniel Mensinger
0358445b6e
fix: dicts and list need _holderify for fallback
3 years ago
Daniel Mensinger
a73791b529
fix: Fix strange holder_map bug in combination with subprojects
...
I was unable to reproduce this in a minimal test-case, so there
is currently no new test :(
3 years ago
Daniel Mensinger
f1ac7db2e6
fix: Fix set_variable not holderifying ( fixes #8904 )
3 years ago
Orta Therox
2e8729a7e6
Update Quick-guide.md
3 years ago
Daniel Mensinger
7c757dff71
holders: Fix the remaining code to respect the holder changes
3 years ago
Daniel Mensinger
34c28dc92c
holders: remove unholder
3 years ago
Daniel Mensinger
84a3e459a8
holders: Introduce BothLibraries
3 years ago
Daniel Mensinger
c2c7f7c9d7
holders: Ensure that InterpreterBase is the sole instance for (un)holderifying
3 years ago
Daniel Mensinger
6879e84c48
holders: Move get_version from directly to ExternalProgram
3 years ago
Daniel Mensinger
66b32a4591
holders: Introduce HoldableObject
3 years ago
Daniel Mensinger
d601227cb2
interpreter: Add FileHolder and remove specical case for File
3 years ago
Daniel Mensinger
7be172fe16
interpreter: Meson does not have floats --> remove them
3 years ago
Daniel Mensinger
63ade7d937
interpreter: Add a new MesonInterpreterObject for non-elementary objects
3 years ago
Daniel Mensinger
202e345dfb
interpreter: Refactor interpreter.compiler to use ObjectHolder
3 years ago
Daniel Mensinger
2b09af834a
interpreter: Refactor ObjectHolder to extend InterpreterObject
3 years ago
Daniel Mensinger
8f997efc8b
decorators: Add not_set_warning to KwargInfo
3 years ago
Daniel Mensinger
bad14b23d2
decorators: Fix typo
3 years ago
Daniel Mensinger
850f64b9ab
build: textwrap.dedent() some strings
3 years ago
Daniel Mensinger
2c08e55f85
typing: Import missing classes in interpreterobjects.py
3 years ago
Daniel Mensinger
468a215341
mesonlib: Add MesonBugException
3 years ago
Daniel Mensinger
99a91df844
tests: clear mesonlib.project_meson_versions (which **really** needs a refactor)
3 years ago