Commit Graph

2246 Commits

Author SHA1 Message Date
Dylan Baker 32be9bd6de add support for vs_module_defs to Executables
fixes: #9254
2023-09-28 14:35:01 -04:00
Dylan Baker 5421c24ea0 fix using a CustomTargetIndex for vs_module_defs
Because `CustomTargetIndex`es don't have a `subdir` property, but they do
implement the `get_subdir()` method
2023-09-28 14:35:01 -04:00
Lei YU 8d6b474bf6 Add clang-tidy-fix target
Add the `clang-tidy-fix` target to apply clang-tidy fixes to the source
code.
This is done by calling `run-clang-tidy` with `-fix` argument.

Add a test case to run `clang-tidy-fix` and verify the file is changed.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
2023-09-25 16:25:01 +03:00
Xavier Claessens 49e7e3b9cc Allow to fallback to cmake subproject
The method can be overridden by setting the `method` key in the wrap
file and always defaults to 'meson'. cmake.subproject() is still needed
in case specific cmake options need to be passed.

This also makes it easier to extend to other methods in the future e.g.
cargo.
2023-09-22 15:50:26 -04:00
Kunwu.Chan c0da998afa
CPU family support 'sw_64' and remove the compile warning (#12273)
add sw_64 to the list of known cpus
2023-09-22 08:33:19 -07:00
Benoit Pierre 74407670e1 docs: fix `add_project_link_arguments` documentation
It should refer to `add_project_arguments`, not `add_global_arguments`.
2023-09-19 12:29:31 -07:00
Xavier Claessens 10dcd87d00 Rust: Replace rust_crate_type with rust_abi
Meson already knows if it's a shared or static library, user only need
to specify the ABI (Rust or C).
2023-09-19 13:54:49 -04:00
Dylan Baker 8ccdb88137 Rust: Add a rust.proc_macro() method 2023-09-19 13:54:49 -04:00
yyyyyiiiiii e0c4cffd70 fix links
Wayland, Weston, wlroots migrated to gitlab.freedesktop.org
2023-09-18 10:03:24 -07:00
Eberhard Beilharz 5d8e2f301e Update link to lcov
lcov moved from sourceforge to github, so this change updates the link.
2023-09-18 11:26:43 -04:00
L. E. Segovia ca60f71b2e reference tables: Document how to set compiler paths with spaces in environment variables
See #11128
2023-09-15 07:31:37 -04:00
Arsen Arsenović 0af126fec7 install_{data,headers,subdir}: implement follow_symlinks
This permits users who rely on following symlinks to stay on the old
default of following them.
2023-09-13 21:44:40 -04:00
Charles Brunet d3a26d158e raw printer
this printer preserves all whitespaces and comments in original meson.build file. It will be useful for rewrite and potential auto-formatter
2023-09-11 07:51:19 -04:00
Xavier Claessens 10708676ad gnome.mkenum_simple(): Fix include path when header is in subdir
It was generating #include with the basename of every header file. That
assumes that every directory where there are headers are also included
into search path when compiling the .c file.

Change to use path relative to current subdir, which can be both in
build or source directory. That means that we assume that when the .c
file is compiled, the target has a include_directories pointing to the
directory where gnome.mkenum_simple() has been called, which is
generally '.' and added automatically.

Also fix type annotation to only allow str and File sources, other types
have never been working, it would require to iterate over custom target
outputs, etc.

Fixes: #7582
2023-09-09 21:28:22 -04:00
Nomura 5f46ea116c Add support for padding zeroes in int.to_string() method 2023-09-09 19:03:22 -04:00
Nicholas Vinson b51bce070e Add macro_name option to configure_file
Allow macro_name to be speficied as a parameter to configure_file().
This allows C macro-style include guards to be added to
configure_file()'s output when a template file is not given. This change
simplifies the creation of configure files that define macros with
dynamic names and want the C-style include guards.
2023-09-09 07:30:56 -04:00
Moody Liu 3c47216fe9 clike compilers: fix cross_* functions' include
A standard C library may not exist for cross-compile
environments, thus the existence of <stdio.h> cannot be
guaranteed.

Use <stddef.h> instead, this header contains compiler-specific
defines thus it usually comes from the compiler.
2023-09-09 07:25:27 -04:00
Liam Beguin ba1ba1f5b0
docs: refman: add vim syntax file generator
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2023-09-07 19:14:03 -04:00
Marvin Scholz 3fc16f05b5 Add compiler.has_define
Adds a new method to the compiler object, has_define.
This makes it possible to check if a preprocessor macro/define
is set or not.

This is especially helpful if the define in question is empty,
for example:

  #define MESON_EMPTY_DEFINE

This would yield the same results as a missing define with
the existing get_define method, as it would return an empty
string for both cases. Therefore this additional method is
needed.
2023-09-07 00:45:38 +03:00
Xavier Claessens fe9af72684 wrap: Use MESON_PACKAGE_CACHE_DIR as default packagecache path
Allow packagecache to contain already extracted directory to match what
some distro does with Cargo source packages in /usr/share/cargo/registry.

Note that there is no need to lock the cache directory because we
download into a temporary name and atomically rename afterward. It means
we could be downloading the same file twice, but at least integrity is
guaranteed.

Fixes: #12211
2023-09-05 09:05:24 +05:30
Michael Gene Brockus (Dreamer) 6b63c4161d
Adding Meson-UI back on IDE-integration.md 2023-09-04 03:23:43 +03:00
Michael Gene Brockus (Dreamer) b504fe1b3e
Add trilo xtest to users 2023-09-04 02:54:55 +03:00
Charles Brunet cf5adf0c64 add json output format to configure file 2023-08-31 07:52:41 -04:00
Bruce Merry cd30d1889f Document that dicts can be indexed with [] 2023-08-31 06:48:41 -04:00
Bruce Merry 08ad7e770c Doc: fix type signature for add_languages.required
It was listed as `bool`, but it can be a `feature` too.
2023-08-31 06:47:52 -04:00
Jussi Pakkanen 08d83a4a97
Merge pull request #10332 from xclaesse/std-opt
c_std, cpp_std: Change to a list of desired versions in preference order
2023-08-30 12:04:09 -07:00
Bruce Merry 83d3bf85cf Add CUDA id and flags to reference tables 2023-08-28 12:04:40 -04:00
Xavier Claessens 237b4c0f41 FAQ: MinGW UCRT are compatible with MSVC and also use libfoo.a
Prior to Windows 10, libfoo.a were usually not usable with MSVC. This is
not true any more since Autotools projects built with UCRT produce
libfoo.a that are compatible with MSVC.

This is another reason for using that naming convention in Meson.
2023-08-27 10:50:43 -04:00
Xavier Claessens e3a71a7b58 msetup: Update options when builddir is already configured
`meson setup -Dfoo=bar builddir` command was returning success ignoring
new option values.

This now also update options. It is useful because it means
`meson setup -Dfoo=bar builddir && ninja -C builddir` works regardless
whether builddir already exists or not, and when done in a script,
changing options in the script will automatically trigger a reconfigure
if needed. This was already possible by always passing --reconfigure
argument, but that triggers a reconfigure even when options did not
change.
2023-08-25 09:43:24 -04:00
Xavier Claessens 18b96cd069 machine file: Add @GLOBAL_SOURCE_ROOT@ and @DIRNAME@ 2023-08-23 11:33:39 -04:00
Eli Schwartz 184277bb4a
docs: use future annotations for genrefman types in typing_extensions
And in fact *use* typing_extensions, which is sometimes the only way to
get access to TypedDict.

Mostly, reindent almost but not quite an entire file to only define
annotation classes under TYPE_CHECKING.
2023-08-18 11:16:15 -04:00
Tristan Partin 946a3561c2 Revert "Revert "Add fs.relative_to()""
This reverts commit 84c8905d52.

Fixed the cygwin failure...
2023-08-18 07:46:08 -04:00
Charles Brunet 7cbe37ebd9 Add more descriptive description to CustomTarget
Allow modules using CustomTarget to modify the command description used by ninja backend. This result in more precise logs when building a project.
2023-08-18 00:36:49 -04:00
Jan Janssen 88747b4f8d docs: Provide example for feature.disable_auto_if 2023-08-18 00:36:32 -04:00
Eli Schwartz 84c8905d52
Revert "Add fs.relative_to()"
This reverts commit f52bcaa27f.

It did not pass CI, and was merged anyway because there were two CI
errors in the same cygwin job. The other error was not the fault of this
commit, and since cygwin errors were glossed over because they were
"expected", the presence of a new error *added* by this commit was
overlooked.

Per the meson development policy, PRs which result in CI errors
can/should be reverted at will, no questions asked.
2023-08-17 23:56:51 -04:00
Eli Schwartz e313f78465
fix style errors in fs.relative_to implementation
In commit f52bcaa27f a few issues were
added:
- doc typo
- imports for utils.universal are not intended to be directly used, it's
  an internal wrapper that exists solely to make mesonlib work well as
  it always did while simultaneously allowing `meson --internal`
  codepaths to avoid importing anything other than an extremely stripped
  down core
- type annotation specific import was imported at runtime scope
2023-08-17 18:01:41 -04:00
Tristan Partin f52bcaa27f Add fs.relative_to()
Returns a relative path from arg 2 to arg 1 similar to
os.path.relpath().
2023-08-17 17:05:49 -04:00
Charlie Ringström cbf8e67f19 Replace deprecated GTK flag 2023-08-17 15:33:35 -04:00
Tristan Partin 14892eb849
Fix some random capitalization in feature.yaml 2023-08-16 21:56:31 -04:00
Andrew McNulty c730807696 Python: Add 'limited_api' kwarg to extension_module
This commit adds a new keyword arg to extension_module() that enables
a user to target the Python Limited API, declaring the version of the
limited API that they wish to target.

Two new unittests have been added to test this functionality.
2023-08-14 20:02:09 -04:00
Jan Janssen 03a2a3a677 docs: Add more feature truth tables
These are much easier to understand at a glance than free-form text.
2023-08-11 08:33:00 -04:00
Xavier Claessens 82a8c72187 c_std, cpp_std: Change to a list of desired versions in preference order
Projects that prefer GNU C but can fallback to ISO C can now set for
example `default_options: 'c_std=gnu11,c11'` and it will use gnu11 when
available, fallback to c11 otherwise. It is an error only if none of the
values are supported by the current compiler.

This allows to deprecate gnuXX values from MSVC compiler, that means
that `default_options: 'c_std=gnu11'` will now print warning with MSVC
but still fallback to 'c11' value. No warning is printed if at least one
of the values is valid, i.e. `default_options: 'c_std=gnu11,c11'`.

In the future that deprecation warning will become an hard error because
`c_std=gnu11` should mean GNU is required, for projects that cannot be
built with MSVC for example.
2023-08-07 08:28:00 -04:00
Xavier Claessens 9df1627997 Compiler: Add werror kwarg to compiles(), links() and run() methods
Fixes: #5399
2023-08-07 08:21:05 -04:00
Sebastian Crane 2a731cc021 docs: add missing punctuation 2023-08-07 06:53:01 -04:00
Milan Hauth 78337653fc fixup: since: 1.1.0 -> 1.3.0 2023-08-05 07:14:08 -04:00
Xavier Claessens e01d53b816 compiler: Add required keyword to has_* methods
add the "required" keyword to the functions

has_function
has_type
has_member
has_members
has_argument
has_multi_arguments
has_link_argument
has_multi_link_argument
has_function_attribute

Co-authored-by: Milan Hauth <milahu@gmail.com>
2023-08-05 07:14:08 -04:00
Nomura 50baf3c626 Add default_options argument to find_program() 2023-08-04 14:46:39 -04:00
Xavier Claessens cec3edc08a Unify message(), format() and fstring formatting
Share a common function to convert objects to display strings for
consistency.

While at it, also add support for formatting user options.
2023-08-02 13:35:29 -04:00
Volker Weißmann 465ad6d261 Fix syntax mistakes in two examples 2023-08-02 11:33:37 -04:00
Eli Schwartz 13f8eba9b6
treewide: internally avoid deprecated machine file uses of "pkgconfig"
We support this in a machine file:

```
[binaries]
pkgconfig = 'pkg-config'
pkg-config = 'pkg-config'
```

and you can use either one, because internally we look up both. If you
only set *one* of them, this plays awkwardly with setting $PKG_CONFIG,
since we don't know which one you set in the machine file and the
*other* one will be initialized from the environment instead.

In commit 22df45a319 we changed program
lookup of config-tool style dependencies to use the regular tool names
and only fall back on the strange internal names. This affected the
pkg-config class too.

The result is that instead of preferring `pkgconfig =` followed by
$PKG_CONFIG followed by `pkg-config =`, we inverted the lookup order.
This is a good idea anyway, because now it behaves consistently with
`find_program('pkg-config')`.

Unfortunately, we documented the wrong name in a bunch of places, and
also used the wrong name in various testsuite bits, which meant that if
you set $PKG_CONFIG and then ran the testsuite, it would fail.

Correct these references, because they are buggy.

One test case expected to find_program() a native copy for convenience
of testing against natively installed glib. Force it to resolve a native
copy.
2023-08-02 01:35:16 -04:00
Alex Rao ce5f2982e4
Fix typo in Cross-compilation.md 2023-08-01 15:33:47 -04:00
Eli Schwartz 01902d7227
ugh, fix typo in previous commit 2023-07-28 12:21:20 -04:00
Eli Schwartz 1b8dcbcc57
docs: clarify what str.split does
The wording was a bit confusing and misled at least one person into
thinking it behaved like `str.replace('c', '')` operating on the entire
line. Tweak the wording to be more precise and avoid this confusion.
2023-07-28 12:13:42 -04:00
Daniele Nicolodi 9eb7fe332f Fix install_data() default install path
This fixes two issues in constructing the default installation path
when install_dir is not specified:

- inside a subproject, install_data() would construct the destination
  path using the parent project name instead than the current project
  name,

- when specifying preserve_path, install_data() would construct the
  destination path omitting the project name.

Fixes #11910.
2023-07-26 13:30:49 -04:00
Eli Schwartz 1bca73cc37
docs: fix typo in previous commit 2023-07-20 14:45:30 -04:00
Dylan Baker d7acccd36d interpreter: deprecate 'jar' value of build_target(target_type)
Jar has a very low set of overlap with other target types, including
that jar sources *must* be .java, and no other target allows .java
sources. As such, the difficulty in crafting a useful `build_target`
invocation that allows both `jar` and anything else is high, and the
usefulness is dubious. Just use `jar()` directly instead.

This depends on the changes to make all of the jar() specific keyword
arguments be handled by typed_kwargs so that the deprecation messages
are correct and consistent.
2023-07-20 14:20:46 -04:00
Peter Hutterer 1502b90f3a docs: improve formatting of the Rust module
This brings the formatting more in line with other modules, in
particular the headers do not include the full function signature for
readability, keyword arguments are listed one-by-one, etc.
2023-07-18 19:49:08 -04:00
Peter Hutterer f9debd3ae2 docs: fix typos and keyword markdown for the Rust module page
Two typos and mark the keyword arguments with backticks so they render
nicely.
2023-07-18 19:49:08 -04:00
Jussi Pakkanen 7824ff80dc Whoopsie, forgot to create the release notes. 2023-07-17 00:39:44 +03:00
MiroPalmu 61984bcfa3 Add import instructions for filesystem module 2023-07-13 01:59:04 -04:00
meator a5b74d208b Fix typo in Disabler.md 2023-07-06 13:14:45 -04:00
Dylan Baker 42c68291c4 environment: separate illumos and Solaris kernels in Machines
While both kernels are derived from the OpenSolaris project of Sun, they
have diverged and code that works with one may not work with the other.
As such, we should provide different values for them. This was requested
by both Oracle and the illumos upstreams.

Fixes: #11922
2023-07-04 19:02:03 +03:00
GertyP 36bf53bdfd
Experimental 'genvslite' WIP. (#11049)
* Capture all compile args from the first round of ninja backend generation for all languages used in building the targets so that these args, defines, and include paths can be applied to the .vcxproj's intellisense fields for all buildtypes/configurations.

Solution generation is now set up for mutiple build configurations (buildtypes) when using '--genvslite'.

All generated vcxprojs invoke the same high-level meson compile to build all targets;  there's no selective target building (could add this later).  Related to this, we skip pointlessly generating vcxprojs for targets that aren't buildable (BuildTarget-derived), which aren't of interest to the user anyway.

When using --genvslite, no longer inject '<ProjectReference ...>' dependencies on which a generated .vcxproj depends because that imposes a forced visual studio build dependency, which we don't want, since we're essentially bypassing VS's build in favour of running 'meson compile ...'.

When populating the vcxproj's shared intellisense defines, include paths, and compiler options fields, we choose the most frequent src file language, since this means more project src files can simply reference the project shared fields and fewer files of non-primary language types need to populate their full set of intellisense fields.  This makes for smaller .vcxproj files.

Paths for generated source/header/etc files, left alone, would be added to solution projects relative to the '..._vs' build directory, where they're never generated;  they're generated under the respective '..._[debug/opt/release]' ninja build directories that correspond to the solution build configuration. Although VS doesn't allow conditional src/header listings in vcxprojs (at least not in a simple way that I'm aware of), we can ensure these generated sources get adjusted to at least reference locations under one of the concrete build directories (I've chosen '..._debug') under which they will be generated.

Testing with --genvslite has revealed that, in some cases, the presence of 'c:\windows\system32;c:\windows' on the 'Path' environment variable (via the make-style project's ExecutablePath element) is critical to getting the 'meson compile ...' build to succeed.  Not sure whether this is some 'find and guess' implicit defaults behaviour within meson or within the MSVC compiler that some projects may rely on. Feels weird but not sure of a better solution than forcibly adding these to the Path environment variable (the Executable Path property of the project).

Added a new windows-only test to windowstests.py ('test_genvslite') to exercise the --genvslite option along with checking that the 'msbuild' command invokes the 'meson compile ...' of the build-type-appropriate-suffixed temporary build dir and checks expected program output.

Check and report error if user specifies a non-ninja backend with a 'genvslite' setup, since that conflicts with the stated behaviour of genvslite.  Also added this test case to 'WindowsTests.test_genvslite'

I had problems tracking down some problematic environment variable behaviour, which appears to need a work-around. See further notes on VSINSTALLDIR, in windowstests.py, test_genvslite.
'meson setup --help' clearly states that positional arguments are ... [builddir] [sourcedir].  However, BasePlatformTests.init(...) was passing these in the order [sourcedir] [builddir].  This was producing failures, saying, "ERROR: Neither directory contains a build file meson.build." but when using the correct ordering, setup now succeeds.

Changed regen, run_tests, and run_install utility projects to be simpler makefile projects instead, with commands to invoke the appropriate '...meson.py --internal regencheck ...' (or install/test) on the '[builddir]_[buildtype]' as appropriate for the curent VS configuration.  Also, since the 'regen.vcxproj' utility didn't work correctly with '--genvslite' setup build dirs, and getting it to fully work would require more non-trivial intrusion into new parts of meson (i.e. '--internal regencheck', '--internal regenerate', and perhaps also 'setup --reconfigure'), for now, the REGEN project is replaced with a simpler, lighter-weight RECONFIGURE utility proj, which is unlinked from any solution build dependencies and which simply runs 'meson setup --reconfigure [builddir]_[buildtype] [srcdir]' on each of the ninja-backend build dirs for each buildtype.
Yes, although this will enable the building/compiling to be correctly configured, it can leave the solution/vcxprojs stale and out-of-date, it's simple for the user to 'meson setup --genvslite ...' to fully regenerate an updated, correct solution again. However, I've noted this down as a 'fixme' to consider implementing the full regen behaviour for the genvslite case.

* Review feedback changes -
- Avoid use of 'captured_compile_args_per_buildtype_and_target' as an 'out' param.
- Factored a little msetup.py, 'run(...)' macro/looping setup steps, for genvslite, out into a 'run_genvslite_setup' func.

* Review feedback:  Fixed missing spaces between multi-line strings.

* 'backend_name' assignment gets immediately overwritten in 'genvslite' case so moved it into else/non-genvslite block.

* Had to bump up 'test cases/unit/113 genvslites/...' up to 114; it collided with a newly added test dir again.

* Changed validation of 'capture' and 'captured_compile_args_...' to use MesonBugException instead of MesonException.

* Changed some function param and closing brace indentation.
2023-06-28 15:29:57 +03:00
Dylan Baker 5d16bd5308 modules/rust: Add a keyword argument to pass extra args to the rust compiler
This may be necessary to, for example, stop rustc complaining about
unused functions
2023-06-27 11:53:18 -07:00
Dylan Baker c5b16ab8b9 modules/rust: Add a machine file property for extra clang args with bindgen
It's currently impossible to inject extra clang arguments when using
bindgen, which is problematic when cross compiling since you may need
critical arguments like `--target=...`. Because such arguments must be
passed after the `--` it's impossible to inject them currently without
going to something like a wrapper script.

Fixes: #11805
2023-06-27 11:53:18 -07:00
Dylan Baker 43f24060f3 modules/rust: Add a `link_with` kwarg to the test method
This was requested by Mesa, where a bunch of `declare_dependency`
objects are being created as a workaround for the lack of this keyword
2023-06-27 11:53:18 -07:00
Dan Hawson 8e879911ec Added a little more useful info to 'link_whole' documentation, describing the use of /LINKWHOLE with MSVC and the behaviour of re-exporting symbols of individual objects in a static library. 2023-06-27 20:22:11 +03:00
Jussi Pakkanen 9e1dc30f1f Add CppNorth talk. 2023-06-25 16:27:42 +03:00
Alyssa Ross ab17bd2393 rust: fix -C prefer-dynamic behavior
I noticed when building a project that uses a proc macro that Meson
passed -C prefer-dynamic for the executable, and not the proc macro,
while cargo passed -C prefer-dynamic for the proc macro, but not for
the executable.  Meson's behavior broke setting -C panic=abort on the
executable.

As far as we can tell, because we explicitly pass each library path to
rustc, the only thing -C prefer-dynamic affects in Meson is how the
standard libraries are linked.  Generally, one does not want the
standard libraries to be dynamically linked, because if the Rust
compiler is ever updated, anything linked against the old standard
libraries will likely break, due to the lack of a stable Rust ABI.
Therefore, I've reorganised Meson's behavior around the principle that
the standard libraries should only be dynamically linked when Rust
dynamic linking has already been opted into in some other way.  The
details of how this manifests are now explained in the documentation.
2023-06-21 18:05:16 -04:00
Paolo Borelli 548dd25c67 Clarify `environment` docs.
The object is not used only for tests, but also for `custom_target` etc.
2023-06-21 08:45:47 -04:00
Xavier Claessens 4c85a7af92 doc: Dictionaries are ordered since Meson 0.62.0
This is a side effect of requiring Python >= 3.7 which itself guarantees
dictionary order. This is now a Meson language guarantee as well which
is required for passing default_options as dict and is generally
expected by users.
2023-06-20 16:10:20 -07:00
Xavier Claessens 6f2956e76c interpreter: Accept more types in default_options dict values 2023-06-20 16:10:20 -07:00
Dylan Baker be20e0809f interpreter: allow default_options and override_options as a dict 2023-06-20 16:10:20 -07:00
Martin Dørum e869a09bc2 add str.splitlines method
The new splitlines method on str is intended to replace usage of
fs.read('whatever').strip().split('\n').
The problem with the .strip().split() approach is that it doesn't have a
way to represent empty lists (an empty string becomes a list with one
empty string, not an empty list), and it doesn't handle Windows-style
line endings.
2023-06-20 08:28:47 -04:00
Jussi Pakkanen b0d2a92584 Add kernel and subsystem properties to machine objects. 2023-06-19 18:03:57 +03:00
Sébastien Villemot f2f42318ed Fix name of boost_includedir property 2023-06-08 14:31:01 -04:00
Tristan Partin 58aa301acc Override find_program('meson')
This override transparently upgrades anyone using it to this better
functionality.

Fixes #8511
2023-06-06 10:07:36 -04:00
Nathan Kidd e20717ed8f docs: List vc++20 for cpp_std
vc++20 support was added in 012ec7d5b3
2023-06-02 08:32:07 -07:00
Dylan Baker ada2a976f0
mlog: use a hidden class for state
This is a pretty common pattern in python (the standard library uses it
a ton): A class is created, with a single private instance in the
module, and then it's methods are exposed as public API. This removes
the need for the global statement, and is generally a little easier to
reason about thanks to encapsulation.
2023-05-31 17:20:44 -04:00
Nicholas Vinson 5689ecffa3 add refivar to users.md 2023-05-26 06:56:47 -04:00
Nicholas Vinson 9eb388a44d Update Users.md
fix package ordering to so Q* and r* packages are in alphabetical order.
2023-05-26 06:56:47 -04:00
Charles Brunet e7b9dfac98 mtest: wildcard selection
Allow the use of wildcards (e.g. *) to match test names in `meson test`.

Raise an error is given test name does not match any test.

Optimize the search by looping through the list of tests only once.
2023-05-25 13:44:13 -04:00
Eli Schwartz 2c806099c7
repair install_mode support for uid/gid effectively everywhere
We silently dropped all integer values to install_mode since the
original implementation of doing this in KwargInfo, in commit
596c8d4af5.

This happened because install_mode is supposed to convert False
(exactly) to None, and otherwise pass all arguments in place. But a
generator is homogeneous and attempting to do this correctly produced a
mypy error that FileMode arguments were allowed to be ints -- well of
course they are -- so that resulted in the convertor... treating ints
like False instead, to make mypy happy.

Fixes #11538
2023-05-24 19:05:06 -04:00
Pablo Correa Gómez e65f741e79 docs: gnome: mention that compile_resources adds dependencies by default
It is not very clear from the documentation that the dependencies in the
resource file are added as default dependencies to the target.
2023-05-23 23:07:16 -04:00
Nirbheek Chauhan 11a4cb7aad docs: Fix some typos in feature option examples 2023-05-23 18:24:08 -04:00
Volker Weißmann 12a2dc86ca Allow generator.process(generator.process(...))
Fixes #1141
2023-05-21 22:12:57 +03:00
Eli Schwartz 10d6d2860c
docs: mention additional python modules needed for building
Also check that they are available in meson.build.

Closes #11772
2023-05-09 21:33:33 -04:00
Eli Schwartz 53f43605ce
docs: make the man page installable
Users now have the *option* to run the documentation build and use
`meson install` to install man pages.
2023-05-09 21:33:32 -04:00
Eli Schwartz 6f78db93bf
docs: add option to skip building HTML docs
Reorder meson targets to handle those all at the end, and exit early if
HTML documentation is disabled. This makes it possible to build just the
manpage, without hotdoc installed.
2023-05-09 21:33:32 -04:00
Eli Schwartz 740d926eee
docs: add meson option to use the unsafe loader 2023-05-09 19:48:42 -04:00
Jussi Pakkanen 9de07ff4d7
Enable fatal warnings in HotDoc when building website. 2023-05-09 18:36:25 -04:00
Joel Rosdahl aab4a0c163 docs/prebuilt: fix sanity check logic in the example 2023-05-08 14:54:01 -04:00
Nomura c1fce8f60f Initial support for Metrowerks Assembler 2023-05-06 19:57:06 +03:00
Xavier Claessens 4ed5c0eefa doc: Add link to argument details 2023-05-03 15:06:35 -04:00
Renan Lavarec e94de2b872 Visual studio: Generate vcxproj.filters files to adds filters to imitated directories to navigate more easily in the source files. 2023-05-03 17:49:05 +03:00
Eli Schwartz 0e7fb07f91
python module: add an automatic byte-compilation step
For all source `*.py` files installed via either py.install_sources() or
an `install_dir: py.get_install_dir()`, produce `*.pyc` files at install
time. Controllable via a module option.
2023-05-02 19:28:35 -04:00
Charles Brunet 51b9f2f1a5 Find python3.xx on windows 2023-05-02 17:52:10 -04:00
Volker Weißmann 38b35eca30 Add env kwarg to gnome.generate_gir().
Fixes #384
2023-04-26 14:51:10 -04:00
Matthieu Bouron 09ec4f6e22 dependencies: allow to fallback on CMake to find the SDL2 library
On Windows, the SDL2 library is generally provided with only CMake config
files. This commit allows meson to fallback on CMake as a last resort to
find the SDL2 library.
2023-04-24 11:41:55 -04:00
Nomura 18cfa545f0 Initial support for Metrowerks C/C++ compiler 2023-04-24 09:07:37 -04:00