summaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
AgeCommit message (Collapse)Author
2024-09-21Document get_variable(system)unknown
2024-09-06alias_target with both_libs builds bothCharles Brunet
2024-09-06auto select static or shared when linking both_libraries togetherCharles Brunet
2024-09-06add default_both_libraries core optionCharles Brunet
2024-08-30Feature checks: fall back to reporting insufficiently portable featuresEli Schwartz
When projects do not specify a minimum meson version, we used to avoid giving them the benefit of the Feature checks framework. Instead: - warn for features that were added after the most recent semver bump, since they aren't portable to the range of versions people might use these days - warn for features that were deprecated before the upcoming semver bump, i.e. all deprecated features, since they aren't portable to upcoming semver-compatible versions people might be imminently upgrading to
2024-08-27Allow external programs in test()'s 'args' parameterDavid Gibson
Although it's not especially common, there are certainly cases where it's useful to pass the path to an external program to a test program. Fixes: https://github.com/mesonbuild/meson/issues/3552 Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2024-07-28add initial support for llvm-flangH. Vetinari
2024-07-15cmake: Only propagate interface link flags in depJonathon Anderson
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.
2024-07-10Release 1.5.0 time.Jussi Pakkanen
2024-06-23find_program: add a kwarg to specify custom version argumentDudemanguy
When trying to get the version of a program, meson was previously hardcoded to run the binary with `--version`. This does work with the vast majority of programs, but there are a few outliers (e.g. ffmpeg) which have an unusual argument for printing out the version. Support these programs by introducing a version_argument kwarg in find_program which allows users to override `--version` with whatever the custom argument for printing the version may be for the program.
2024-06-17Add meson test --max-linesDaan De Meyer
Let's allow users to configure how many lines are shown at most when a test fails.
2024-06-14cargo: Load Cargo.lockXavier Claessens
Cargo.lock is essentially identical to subprojects/*.wrap files. When a (sub)project has a Cargo.lock file this allows automatic fallback for its cargo dependencies.
2024-05-15Merge pull request #11421 from mon/ti-armclangJussi Pakkanen
Basic support for TI Arm Clang toolchain
2024-05-09implement @PLAINNAME0@ and @BASENAME0@Stas Sergeev
@PLAINNAME@ and @BASENAME@ cannot be used in custom_target() with multiple inputs. For those, similar macros are needed with an index. Fixes #13164
2024-05-08mtest: Set MESON_TEST_ITERATION to the current iteration of the testDaan De Meyer
When running our integration tests in systemd we depend on each test having a unique name. This is always the case unless --repeat is used, in which case multiple tests with the same name run concurrently which causes issues when allocating resources that use the test name as the identifier. Let's set MESON_TEST_ITERATION to the current iteration of the test so we can use $TEST_NAME-$TEST_ITERATION as our test identifiers which will avoid these issues.
2024-05-07Add support for GCC's null_terminated_string_arg function attributeTristan Partin
This is new as of 14.1.
2024-05-01Add required kwarg to compiler.{compiles,links,run}Tristan Partin
This is a similar commit to the one that added required to all the compiler.has* functions.
2024-04-28Add support for depending on ObjFWJonathan Schleifer
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-25docs: fix bad link in snippetDylan Baker
2024-04-25find_library: improve the docs and FeatureNew to fully describe the changeEli Schwartz
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-24docs: Add CMake build type release note snippetJouke Witteveen
2024-04-24Merge pull request #13112 from DaanDeMeyer/interactiveJussi Pakkanen
Add meson test --interactive
2024-04-23Add meson test --interactiveDaan De Meyer
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-23interpreter: implement the `name()` method for `ExternalLibraryHolder`Dylan Baker
This allows `cc.find_library().name()` to work, just like `dependency().name()`. Fixes: #13053
2024-04-15Add bztar support to meson distTristan Partin
Some projects, like Postgres, distribute code in this format.
2024-04-08meson format commandCharles Brunet
2024-03-18mconf: Reload the options files if they have changedDylan Baker
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-15compilers: Every compiler can run codeXavier Claessens
Compiling and linking code is part of the Compiler base class, there is no reason it cannot also run executables.
2024-03-15wayland: Stable protocols can have a versionXavier Claessens
Fixes: #12968
2024-03-15cargo: Add API version into dependency nameXavier Claessens
2024-03-13Generate relnotes for 1.4.0.Jussi Pakkanen
2024-03-13Basic support for TI ARM-CLANG toolchainWilliam Toohey
2024-03-12Added support for Texas Instruments C6000 compiler.Petr Machacek
2024-02-26docs: fix typo in snippet: "hueristic" -> "heuristic"Dylan Baker
2024-02-25docs: fix some release notes snippet typosEli Schwartz
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-24Add support for BuildTargetTypes to various fs module functionsTristan Partin
The new support was added to fs.name, fs.parent, fs.replace_suffix, and fs.stem.
2024-02-24Allow using CustomTarget as test executableCharles Brunet
Fixes #6567
2024-02-23mtest: set MSAN_OPTIONS to abort by defaultSam James
Followup to 7b7d2e060b447de9c2642848847370a58711ac1c 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-23env.unset methodCharles Brunet
2024-02-23modules/rust: inject a C/C++ standard for bindgenDylan Baker
Especially for C++ this is very important.
2024-02-23modules/rust: Allow explicitly setting the language to bindDylan Baker
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-23rust/bindgen: Use Meson rules for C++ headersDylan Baker
Bindgen natively only considers .hpp to be C++ headers, but Meson considers some additional extensions including .hh and .hxx to be C++.
2024-02-12qt: add preserve_paths keyword to functionsCharles Brunet
This allow to generate ui and moc under subdirectories, as this is allowed with generic generators.
2024-02-06Add a numpy dependency with pkg-config and configtool methodsRalf Gommers
These are being added for NumPy 2.0 The implementation closely follows the one for the pybind11 dependency.
2024-01-17compiler.preprocess: add depends kwargStas Sergeev
This patch adds 'depends' keyword to compiler.preprocess(). It allows to execute other targets before doing the preprocessing. Test-case is added to demonstrate that functionality: it generates the header before preprocessing the C source that uses that generated header. Thanks to @bruchar1 for getting this patch to work.
2024-01-09compilers: cpp: wire up debugstl for ClangSam James
For Clang, we now pass -D_GLIBCXX_DEBUG=1 if debugstl is enabled, and we also pass -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG. Per https://discourse.llvm.org/t/building-a-program-with-d-libcpp-debug-1-against-a-libc-that-is-not-itself-built-with-that-define/59176/3, we can't use _LIBCPP_DEBUG for older Clang versions as it's unreliable unless libc++ was built with it. We choose MODE_DEBUG for stldebug while building with assertions will do MODE_EXTENSIVE. Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2024-01-09compilers: cpp: wire up stdlib assertionsSam James
None of the options set here affect ABI and are intended for detecting constraint violations. For GCC, we simply need to set -D_GLIBCXX_ASSERTIONS. For Clang, the situation is far more complicated: * LLVM 18 uses a 'hardened mode' (https://libcxx.llvm.org/Hardening.html). There are several levels of severity available here. I've chosen _LIBCPP_HARDENING_MODE_EXTENSIVE as the strongest-but-one. The strongest one (_DEBUG) doesn't affect ABI still but is reserved for stldebug. * LLVM 15 uses a similar approach to libstdc++ called '_LIBCPP_ENABLE_ASSERTIONS' Note that LLVM 17 while in development had fully deprecated _LIBCPP_ENABLE_ASSERTIONS in favour of hardened, but changed its mind last-minute: https://discourse.llvm.org/t/rfc-hardening-in-libc/73925/4. Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
2023-12-12cmake: parse project versionNicolas Werner
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.
2023-11-24File: Add full_path() methodXavier Claessens
This is needed now that str.format() is not allowing it any more. It is also more consistent with other objects that have that method as well, such as build targets. Fixes: #12406
2023-11-19Generate release notes for 1.3.0.Jussi Pakkanen