Commit Graph

2290 Commits

Author SHA1 Message Date
Jonathan Schleifer 6c6529337e Add support for depending on ObjFW
This uses objfw-config to get to the flags, however, there's still
several todos that can only be addressed once dependencies can have
per-language flags.
2024-04-28 03:14:29 -04:00
Dr. Vedran Miletić f8d957febf Added NumPy to users
NumPy is built with Meson since version 1.26.
2024-04-27 00:17:33 +03:00
Dylan Baker 16ed01555d
docs: fix bad link in snippet 2024-04-25 17:28:03 -07:00
Eli Schwartz a2ac3bc453
find_library: improve the docs and FeatureNew to fully describe the change
The docs didn't really explain what the issue was with using it. And
it's not actually a "crash" either way.

The FeatureNew mentions that "name" is new, but it is standard for
these warnings to tell you both the type of object you're operating on
and the name of the method that is an issue. This omitted the former,
and was very confusing.
2024-04-25 16:22:26 -04:00
Jouke Witteveen 8e9be88f69 docs: Add CMake build type release note snippet 2024-04-24 08:35:23 -07:00
Jussi Pakkanen 575414094d
Merge pull request #13112 from DaanDeMeyer/interactive
Add meson test --interactive
2024-04-24 18:29:01 +03:00
Daan De Meyer 344a97e08a Add meson test --interactive
This is very similar to --gdb, except it doesn't spawn GDB, but
connects stdin/stdout/stderr directly to the test itself. This allows
interacting with integration tests that spawn a shell in a container
or virtual machine when the test fails.

In systemd we're migrating our integration tests to run using the
meson test runner. We want to allow interactive debugging of failed
tests directly in the virtual machine or container that is spawned
to run the test. To make this possible, we need meson test to connect
stdin/stdout/stderr of the test directly to the user's terminal, just
like is done with the --gdb option.
2024-04-23 21:36:22 +02:00
Dylan Baker 4f94284013 interpreter: implement the `name()` method for `ExternalLibraryHolder`
This allows `cc.find_library().name()` to work, just like
`dependency().name()`.

Fixes: #13053
2024-04-23 11:27:12 -07:00
John Ericson be62df7fc7 Add a few more notes to the style guide
- Mention 2 space indent seems to be the most idiomatic

- Mention trailing commas are good

- Update example to use trailing commas
2024-04-23 18:15:34 +03:00
Wu, Zhenyu 0ed78cf6fa docs: fix a typo of path
Refer https://github.com/mesonbuild/meson/blob/master/docs/markdown/Machine-files.md?plain=1#L285
2024-04-22 23:08:19 +03:00
Tristan Partin 2d3954efac Add bztar support to meson dist
Some projects, like Postgres, distribute code in this format.
2024-04-15 16:17:44 -04:00
Xavier Claessens 9f02d0a3e5 Clarify mutable objects usage
Only Environment and ConfigurationData are mutable. However, only
ConfigurationData becomes immutable after first use which is
inconsistent.

This deprecates modification after first use of Environment object and
clarify documentation.
2024-04-14 19:40:02 +03:00
Philip Chimento 4e6bed6eb0 docs: Howto exclude file from unity build
Adds a howto section describing how to put files in a separate build
target and override the unity build setting, and why you might want to
do this.

Closes: #13031
2024-04-12 00:36:15 -04:00
Charles Brunet 2b37101998 meson format command 2024-04-08 10:43:57 -07:00
Michael Gene Brockus (Dreamer) b053eaba00 Update Users.md 2024-04-08 09:42:04 -07:00
Gerion Entrup 06bc8a8d37 depends keyword argument: accept CustomTargetIndex
That holds for all of these meson function: run_target, generator and
custom_target and additionally to the Windows and Gnome module.
2024-04-05 09:36:59 -07:00
Jussi Pakkanen 27caa765ff Update Pip install documentation. 2024-03-29 16:29:49 -04:00
Dylan Baker 2d7b7c3aaf mconf: Reload the options files if they have changed
This fixes issues where a new option is added, an option is removed, the
constraints of an option are changed, an option file is added where one
didn't previously exist, an option file is deleted, or it is renamed
between meson_options.txt and meson.options

There is one case that is known to not work, but it's probably a less
common case, which is setting options for an unconfigured subproject.
We could probably make that work in some cases, but I don't think it
makes sense to download a wrap during meson configure.
2024-03-18 16:06:37 -07:00
Christoph Reiter 0762b86e59 tests: rename skip_on_jobname to expect_skip_on_jobname and skip_on_os to expect_skip_on_os
The test.json format currently has three keys related to skipping tests:

* `skip_on_jobname`
* `skip_on_os`
* `skip_on_env`

While `skip_on_env` marks the test itself as skipped, i.e. they don't get run when the
conditions are met, the other two skip options are just marking the test as "expected to be skipped"
if the conditions apply, i.e. they want to see `MESON_SKIP_TEST` in the output and things will
fail if that doesn't happen. They don't actually skip the tests as the names imply.

To make this clearer rename the keys:

* `skip_on_jobname` -> `expect_skip_on_jobname`
* `skip_on_os` -> `expect_skip_on_os`

`skip_on_env` stays the same, since that actually skips.

The docs were also confused about this, so adjust that too.
2024-03-17 04:46:26 -04:00
Xavier Claessens f41a95ddf2 compilers: Every compiler can run code
Compiling and linking code is part of the Compiler base class, there is
no reason it cannot also run executables.
2024-03-15 11:38:54 -04:00
Xavier Claessens 3afbe042af wayland: Stable protocols can have a version
Fixes: #12968
2024-03-15 09:24:46 -04:00
Xavier Claessens 4d3fb88753 cargo: Add API version into dependency name 2024-03-15 09:21:58 -04:00
Jussi Pakkanen 0b7b4a3d9e Generate relnotes for 1.4.0. 2024-03-13 21:44:41 +02:00
Petr Machacek eb74bb8dbf Added support for Texas Instruments C6000 compiler. 2024-03-12 20:38:30 +02:00
LIU Hao 8357548ca0 doc/Users: Add asteria and mcfgthread 2024-03-04 10:51:48 -05:00
Jussi Pakkanen 54996132af
Merge pull request #12804 from joukewitteveen/dist-rewriter
Support `meson dist` when getting project versions from VCS
2024-03-02 00:59:32 +02:00
Dylan Baker fb72a8ecdb docs: fix typo in snippet: "hueristic" -> "heuristic" 2024-02-26 10:15:14 -08:00
Xavier Claessens 435e881c18 cargo: Call into meson subdir if it exists
This allows projects to manually add extra rust args and deps. This is
intended to replace build.rs logic.
2024-02-26 10:03:52 -05:00
Xavier Claessens 4d55645c39 cargo: Abort if features are missing 2024-02-26 10:03:52 -05:00
Xavier Claessens 114e032e6a cargo: Expose features as Meson boolean options 2024-02-26 10:03:52 -05:00
Eli Schwartz 42944f72a4
docs: fix some release notes snippet typos
commit 6a8330af598753d5982a37933beeac2d6b565386: hpp was clearly meant
and used several times, just not in the release notes themelves.

commit a75ced6d50a3d479eda6dcdc9c3482493f2161f0: C/C++ "what"? We
mention the std in the commit, but not in the text of the release notes.
2024-02-25 21:17:54 -05:00
L. E. Segovia df2dbd06cf
docs: clarify environment variables take only ExternalProgram.full_path()
Fixes #10901
2024-02-25 20:49:47 -05:00
Ralf Gommers 9ec26051c6 Avoid use of deprecated command form on the cross compilation doc page 2024-02-25 15:39:38 -05:00
Tristan Partin 6a119256a1 Add support for BuildTargetTypes to various fs module functions
The new support was added to fs.name, fs.parent, fs.replace_suffix, and
fs.stem.
2024-02-24 13:09:24 -08:00
Karol Herbst d44185026d meson/rust: wrap `bindgen`s `wrap-static-fns` functionality
This way the `rust.bindgen` can generate a second output being a C file,
which contains wrapper functions for static inline ones.

This output file can then be compiled via C targets.
2024-02-24 09:11:00 -08:00
Charles Brunet 11f2e07071 Allow using CustomTarget as test executable
Fixes #6567
2024-02-24 09:08:20 -08:00
Sam James 8ba0ea6801
mtest: set MSAN_OPTIONS to abort by default
Followup to 7b7d2e060b which handles ASAN and UBSAN.

It turns out that MSAN needs the same treatment. I've checked other sanitizers
like HWASAN and TSAN - it looks like they may both need it too, but Meson doesn't
currently suppose those anyway (see https://github.com/mesonbuild/meson/pull/12648).

Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2024-02-23 15:59:22 -05:00
Charles Brunet 138e0fe984 env.unset method 2024-02-23 21:11:56 +02:00
Dylan Baker e7f20efc8b modules/rust: allow setting a version constraint on bindgen
This allows us to ensure that the bindgen we're using is suitable for
our purpose.
2024-02-23 09:48:32 -08:00
Dylan Baker a75ced6d50 modules/rust: inject a C/C++ standard for bindgen
Especially for C++ this is very important.
2024-02-23 09:48:32 -08:00
Dylan Baker 05d49c6990 modules/rust: Allow explicitly setting the language to bind
This may be of particular use when a header is .h but should be treated
as a C++ header instead of a C header.
2024-02-23 09:48:32 -08:00
Dylan Baker 6a8330af59 rust/bindgen: Use Meson rules for C++ headers
Bindgen natively only considers .hpp to be C++ headers, but Meson
considers some additional extensions including .hh and .hxx to be C++.
2024-02-23 09:48:32 -08:00
Charles Brunet 2c7833b1c9 doc: fix compiler.preprocess varargs documentation
This was inherited from documentation of build target, but some sentences do not make sense in the context of the preprocessor.
2024-02-23 09:03:05 -08:00
Eisuke Kawashima c46d0e733e doc: fix descriptions of dependency and find_program
They accept list as documented
2024-02-18 16:29:30 -05:00
Jouke Witteveen efad4ba9c5 docs: Remove outdated HDF5 dependency pkg-config statement
A config-tool method has been supported since c02593f and it says so
just a few lines below the outdated statement.
2024-02-14 19:53:37 +02:00
Charles Brunet f4f50db441 qt: add preserve_paths keyword to functions
This allow to generate ui and moc under subdirectories,
as this is allowed with generic generators.
2024-02-12 15:49:55 -08:00
Jouke Witteveen 524a66116b Add MESONREWRITE to `meson dist` scripts
Fixes #688
2024-02-12 22:19:59 +01:00
taz-007 152a45a360 doc: benchmark: correct usage on unix 2024-02-12 12:16:32 -08:00
Tristan Partin b08d531c02 Document that alias_target accepts run_tgts since 0.60.0
This was implemented in dc51740e2c,
but was not added to the documentation or marked as a new feature.
2024-02-09 11:56:13 -05:00
Ralf Gommers 80ed1dfa7f Add a numpy dependency with pkg-config and configtool methods
These are being added for NumPy 2.0 The implementation closely follows
the one for the pybind11 dependency.
2024-02-06 12:54:35 -08:00