Commit Graph

2006 Commits

Author SHA1 Message Date
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
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
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
Volker Weißmann 12a2dc86ca Allow generator.process(generator.process(...))
Fixes #1141
2023-05-21 22:12:57 +03: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
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
Sebastian Dröge 01420bf8fc rust: Add new `rust_dependency_map` target configuration
This allows changing the crate name with which a library ends up being
available inside the Rust code, similar to cargo's dependency renaming
feature or `extern crate foo as bar` inside Rust code.
2023-04-21 15:35:06 -04:00
Dylan Baker 474e3ea8af docs: update the Rust bindgen docs to talk about assertions
Since we now guarantee that Rust and C/C++ will have assertions both on
or both off, we can give guidance about using `cfg(debug_assertions)` to
wrap code using `#ifdef NDEBUG`.
2023-04-21 15:18:56 +05:30
Dylan Baker c62989ce80 rust: add support for b_ndebug
Rust has a `debug_assert!()` macro, which is designed to be toggled on
the command line. It is on by default in debug builds, and off by
default in release builds, in cargo. This matches what meson's b_ndebug
option does in `if-release` mode.
2023-04-21 15:18:56 +05:30
Charles Brunet 5eb55075ba intro: add more details to generated json files
This will help with the writing of tools to generate
VisualStudio project and solution files, and possibly
for other IDEs as well.

- Used compilers a about `host`, `build` and `target` machines
  arere listed in `intro-compilers.json`
- Informations lister in `intro-machines.json`
- `intro-dependencies.json` now includes internal dependencies,
  and relations between dependencies.
- `intro-targets.json` now includes dependencies, `vs_module_defs`,
  `win_subsystem`, and linker parameters.
2023-04-20 18:31:39 +03:00
Charles Brunet fbab1488ae extra_files keyword in declare_dependency() 2023-04-20 18:31:39 +03:00
Volker Weißmann 8d2a9e6e5c Update Users.md [skip ci] 2023-04-17 13:03:41 -04:00
Josh Soref cf9fd56bc9 fix various spelling issues
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-11 19:21:05 -04:00
HiPhish 439a61affa Change "can not" to "cannot" throughout project
The word "cannot" expresses inability to do something whereas "can not"
expresses the ability to refrain from doing something.
2023-04-11 17:10:01 +03:00
Pete Dietl a912193fd8 Fix spelling and grammar in Dependencies.md 2023-04-11 12:44:16 +03:00
Jussi Pakkanen 994ba8b549 Generate relnotes for 1.1.0. 2023-04-10 18:39:03 +03:00
Xavier Claessens b30cd5d2d5 Make --vsenv a readonly builtin option
We need to remember its value when reconfiguring, but the Build object
is not reused, only coredata is.

This also makes CLI more consistent by allowing `-Dvsenv=true` syntax.

Fixes: #11309
2023-03-29 09:33:41 -04:00
Xavier Claessens 748a1db1f8 doc: Fix some broken links 2023-03-28 21:46:32 +03:00
Dylan Baker be092c252e docs: replace most uses of `meson_options.txt` with `meson.options`
I've left the old release notes in place, but updated everything else to
use `meson.options`
2023-03-28 15:01:10 +03:00
Dylan Baker 4a014d1724 Add support for meson.options as a replacement for meson_options.txt
We will still try to load `meson_options.txt` if `meson.options` doesn't
exist. Because there are some advantages to using `meson.options` even
with older versions of meson (such as better text editor handling)
we will not warn about the existence of a `meson.options` file if a
`meson_options.txt` file or symlink also exists.

The name `meson.options` was picked instead of alternative proposals,
such as `meson_options.build` for a couple of reasons:

  1. meson.options is shorter
  2. While the syntax is the same, only the `option()` function may be
     called in meson.options, while, it may not be called in meson.build
  3. While the two files share a syntax and elementary types (strings,
     arrays, etc), they have different purposes: `meson.build` declares
     build targets, `meson.options` declares options. This is similar to
     the difference between C's `.c` and `.h` extensions.

As an implementation detail `Interpreter.option_file` has been removed,
as it is used exactly once, in the `project()` call to read the options,
and we can just calculate it there and not store it.

Fixes: #11176
2023-03-28 15:01:10 +03:00
Xavier Claessens 89fe81835b Allow --reconfigure and --wipe of empty builddir
This allows to run setup command regardless whether the builddir has
been configured or not previously. This is useful for example with
scripts that always repeat all options.
  meson setup builddir --reconfigure -Dfoo=bar
2023-03-27 17:50:48 -04:00
andy5995 c5c034525f docs: add 2022 video from PyCon US 2023-03-27 21:43:09 +03:00
Eli Schwartz a024d75e15
backends: add a new "none" backend
It can only be used for projects that don't have any rules at all, i.e.
they are purely using Meson to:

- configure files
- run (script?) tests
- install files that exist by the end of the setup stage

This can be useful e.g. for Meson itself, a pure python project.
2023-03-20 17:22:50 -04:00
Charles Brunet 91b88b1a76 fix meson compile with alias target
this fixes a bug introduced by #11528
2023-03-17 02:05:23 -04:00
Eli Schwartz 62c269d088
dependencies: add pybind11 custom factory
This works with pkg-config and cmake without any special support. The
custom factory adds further support for config-tool, via
`pybind11-config`. This is useful because the config-tool will work out
of the box when pybind11 is installed, but the pkg-config and cmake
files are shoved into python's site-packages, which is an unfortunate
distribution model and makes it impossible to use in an out of the box
manner.

It's possible to manually set up the PKG_CONFIG_PATH to detect it
anyway, but in case that does not happen, having the config-tool
fallback is extremely useful.
2023-03-09 15:13:46 -05:00
Charles Brunet 47f3263165 doc: remove unexisting operators from grammar 2023-03-02 11:19:31 -05:00
Charles Brunet a0d0fb5492 mintro: redirect stdout to stderr 2023-03-02 10:10:03 -05:00
Xavier Claessens 0bb1673ec3 doc: Be more specific about warning_level option
Fixes: #11469
2023-02-28 14:00:59 -05:00
Charles Brunet c7943b993d Improve unity build documentation 2023-02-27 14:29:38 -05:00
andy5995 07076db73e docs: add Criterion 2023-02-27 14:06:40 -05:00
Charles Brunet 4a357ba6b2 documentation: there is no unary + operator 2023-02-27 13:40:16 -05:00
Eli Schwartz 9f6327c77a docs: fix bad advice to use python module to find python 2023-02-24 20:45:00 -05:00
andy5995 f9da31ce61 docs: add gcc to list of compilers with sanitize tools 2023-02-23 16:18:02 -05:00
Valeri ae5d0a6cf0 Update Vs-External.md
Fix minor typo
2023-02-23 07:59:59 -05:00
Eli Schwartz ecb32bf457
minstall: drop privileges before running rebuild_all
If the user runs `sudo meson install` this may run ninja to build
everything that gets installed. This naturally happens as root also, by
default, which is bad. Instead, detect root elevation tools and drop the
uid/gid of the child ninja process back to the original invoking user
before doing anything.
2023-02-20 22:33:46 -05:00
Eli Schwartz a878c38476
minstall: rework root elevation prompt for extensibility and behavior
There's a couple issues with the current approach:
- pkexec is an unusual elevation method, the standard is sudo
- it tries to elevate even in automated workflows
- the user may not want to automatically rerun as root, that might be
  badly behaved

Do some upfront checks instead, first to make sure it even makes sense
to try becoming root, and then to ask the user "do you really want
this". Also check for a couple common approaches to root elevation,
including doas.

Fixes #7345
Fixes #7809
2023-02-20 20:29:31 -05:00
Dylan Baker 946b66eddc docs/prebuilt: Add an example of how to use a wrap file
When using a pre-built library
2023-02-16 09:13:52 -08:00
Dylan Baker 48c9ec2fe1 docs/prebuilt: add some sanity checking to the example.
Instead of just giving a note about about how this is best practice,
actually do it.
2023-02-16 09:13:52 -08:00