summaryrefslogtreecommitdiff
path: root/test cases/common
AgeCommit message (Collapse)Author
2025-03-20handle monorepo license files specified in project() via ../Eli Schwartz
We should simply remap these to elide the ../ as it's pretty obviously the natural expectation of using ../ to fetch files from outside the project and then drop them *into* the project. Monorepos will likely have a single license file (or set) under which the monorepo is licensed. But there will be many components, each of which may use a different build system, which are "standalone" for the most part. We already support this case as long as you build from the monorepo, but the resulting license file gets installed to ``` {licensedir}/../ ``` which is silly and unhelpful. Bug: https://github.com/apache/arrow/issues/36411
2025-02-27tests: add a DSL test for get_option with an unset b_ optionDylan Baker
2025-02-16c: add -Wno-vla-larger-than to the exceptions for -Wno*Paolo Bonzini
When supplying -Wno-vla-larger-than to compiler.get_supported_arguments, meson will inject -Wvla-larger-than as an argument which considered invalid by GCC, as the converse argument is -Wvla-larger-than=<value>. Just like CLikeCompiler._has_multi_arguments special-cases -Wno-attributes=, do the same for -Wno-vla-larger-than. Resolves: https://github.com/mesonbuild/meson/issues/14208 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-02-13Make all Meson level options overridable per subproject.Jussi Pakkanen
2025-01-27allow to compare multiple version with version_compareCharles Brunet
2025-01-21Revert "interpreterbase: Add disabler exception for `get_variable` method"Jussi Pakkanen
This reverts commit 82fedf04033305e2b28db1eea2346018c237d167.
2025-01-19interpreterbase: Add disabler exception for `get_variable` methodAndrew McNulty
Add an exception to the disabler check to allow objects with a `get_variable` method to not always pick a disabler if their arguments contain one. This mimics the behaviour already in place for calls to function, which has a set of excepted functions. Closes #13717 Signed-off-by: Andrew McNulty <amcn102@gmail.com>
2025-01-19Fix broken both_libraries transitive dependenciesCharles Brunet
#13837 broke both_lib transitive deps, because the `as_static` and `as_shared` functions return libraries that still contain references to the other lib type.
2025-01-07Revert "check if test 33 running under MinGW"Christoph Reiter
This reverts commit 93f59313e10090bfe6058fabbb235aa549f933c0.
2024-12-19add test case for @ and curly brace substitution with cmake formatJan200101
2024-11-19check if test 33 running under MinGWMihailJP
2024-11-06vcs_tag: Add install kwargsXavier Claessens
Fixes: #4893
2024-10-20Condense test directories.Jussi Pakkanen
2024-10-18pkgconfig: add support to override pkg-configAndoni Morales Alastruey
2024-10-12test cases: add test for @OUTPUT0@ substitution rulesPierre Lamot
when a generator used a single @OUTPUT0@ and was processing multiple targets, the variable was replaced with a wrong value
2024-10-07Reorder test dirs for rc1.Jussi Pakkanen
2024-09-30tests: use statx instead of sendmmsg in has_function testAndrea Pappacoda
Both recvmmsg/sendmmsg and statx require the `_GNU_SOURCE` symbol to be defined to be shown in headers, but statx has the additional property of being defined on all glibc systems[1], unlike recvmmsg which isn't implemented on Hurd[2][3]. With this fix, all tests now pass on Hurd. $ cat meson.build project('test', 'c') cc = meson.get_compiler('c') cc.has_header_symbol('sys/stat.h', 'statx') cc.has_header_symbol('sys/stat.h', 'statx', prefix: '#define _GNU_SOURCE') cc.has_function('statx') $ meson setup build The Meson build system Version: 1.5.1 Source dir: /tmp/tmp.XcWk4fMra4 Build dir: /tmp/tmp.XcWk4fMra4/build Build type: native build Project name: test Project version: undefined C compiler for the host machine: cc (gcc 14.2.0 "cc (Debian 14.2.0-3) 14.2.0") C linker for the host machine: cc ld.bfd 2.43.1 Host machine cpu family: x86_64 Host machine cpu: x86_64 Header "sys/stat.h" has symbol "statx" : NO Header "sys/stat.h" has symbol "statx" : YES Checking for function "statx" : YES Build targets in project: 0 [1]: https://sourceware.org/git/?p=glibc.git;a=blob;f=io/statx_generic.c;h=93faf12297cfcd37ba005a02e991eab351d74174;hb=HEAD [2]: https://www.gnu.org/software/hurd/open_issues/glibc.html#recvmmsg [3]: https://github.com/mesonbuild/meson/pull/4351
2024-09-23interpreter: when overriding a dependency make its name matchDylan Baker
Otherwise internal dependencies have auto-generated names that are not human readable. Instead, use the name that the dependency overrides. For example: ```meson meson.override_dependency('zlib', declare_dependency()) dep_zlib = dependency('zlib') assert(dep_zlib.name() == 'zlib') ``` Fixes: #12967
2024-09-11Fix pkgconfig.generate handling of BothLibraries dependenciesCharles Brunet
Was caused by 7b3169f. Fixes #13657.
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-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-08-26Skip symlink tests on Windows.Jussi Pakkanen
2024-08-26Convert Bash usage to a Python script.Jussi Pakkanen
2024-08-04CI: Install make on CygwinJon Turney
Test '230 external project' uses make, but is too dumb to use the platform conventions for shared library names in installed files expected by shared_lib, so special case that.
2024-07-19compilers: handle -Wno-attributes= for GCCSam James
For other reasons, Meson transforms "-Wno-x" into "-Wx -Wno-x" for GCC, but this breaks with "-Wno-attributes=x" with: ``` cc1plus: error: arguments ignored for '-Wattributes='; use '-Wno-attributes=' instead ``` Suppress that workaround for -Wno-attributes=. Closes: https://github.com/mesonbuild/meson/issues/13022
2024-07-10tests: Clean up leftover files from source dirs.Jussi Pakkanen
2024-07-05Revert PR12972 as a regression.Eli Schwartz
Revert "interpreter: when overriding a dependency make its name match" This reverts commit b1340e9bb1f243e4de8f2d89415a45ade476a3dc. Revert "dependency: define equality and hash operators for Dependency" This reverts commit 6d713e40f81512eadb0cc4654408d90cb22ba774. This caused some projects to fail to build, such as libplacebo and libepoxy. Taking libplacebo as the example, the produced build.ninja does not include libvulkan.so as a linker input for src/libplacebo.so.338. We are probably getting dependency hashing wrong somewhere. Unsure where exactly and unsure how to create a test case. We are also deep into rc2. Revert it for now and try to re-land these changes for 1.6. Bug: https://bugs.gentoo.org/935443 Fixes: #13352
2024-07-05configuration_data: add test case for regression when merging a confdataEli Schwartz
Regression test for #13372
2024-07-05Revert "Clarify mutable objects usage"Eli Schwartz
This reverts commit 9f02d0a3e5a5ffc82256391c244b1af38e41ef78. It turns out that this does introduce a behavioral change in existing users of ConfigurationData, which it wasn't supposed to (it was supposed to preserve behavior there, and add a new *warning* for EnvironmentVariables). This breaks projects such as pulseaudio, libvirt, and probably more. Roll back the change and try again after 1.5.0 is released. Fixes: #13372
2024-06-26compilers: Add support for OpenMP from homebrew with AppleClangDylan Baker
Which requires injecting some extra paths and the `-Xpreprocess` flag, as well as extra search paths for libomp and the headers. Fixes: #7435
2024-06-23Test case for environment prepend/append acting like setNils Werner
2024-06-23Ensure private directory exists for custom targets (#13196)Scott Kyle
* Ensure private directory exists for custom targets Some custom target commands will expect the `@PRIVATE_DIR@` to already exist, such as with `make -C @PRIVATE_DIR@ ...` * Prefer `exist_ok` over catching exception
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-23`configure_file`: update \@ escape logicMatt Jolly
When configuring a 'meson' or 'cmake@' style file, add a case for escaped variables using matched pairs of `\@` i.e. `\@foo\@ -> @foo@`. The match for @var@ has been amended with a negative lookbehind to ensure that any occurrances of `\@foo@` are not evaluated to `\bar`. The previous behaviour, matching `\@` and escaping only that character, had undesirable side effects including mangling valid perl when configuring files. Closes: https://github.com/mesonbuild/meson/issues/7165
2024-05-07Add support for GCC's null_terminated_string_arg function attributeTristan Partin
This is new as of 14.1.
2024-05-07Use correct subdir when generating processed file pathTristan Partin
We need the subdir of where the output file will actually be created, not the current subdir of the interpreter. Fixes: #13168
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-25tests: bump C++ requirement of has_header_symbolDylan Baker
Boost now requires C++ 14, as of 1.82
2024-04-14Clarify mutable objects usageXavier Claessens
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-05depends keyword argument: accept CustomTargetIndexGerion Entrup
That holds for all of these meson function: run_target, generator and custom_target and additionally to the Windows and Gnome module.
2024-04-05Merge pull request #12144 from amyspark/fix-msvc-clangcl-linker-flag-detectionJussi Pakkanen
linkers: Fix detection of link arguments to Clang(-cl) + MSVC
2024-03-15interpreter: when overriding a dependency make its name matchDylan Baker
Otherwise internal dependencies have auto-generated names that are not human readable. Instead, use the name that the dependency overrides. For example: ```meson meson.override_dependency('zlib', declare_dependency()) dep_zlib = dependency('zlib') assert(dep_zlib.name() == 'zlib') ``` Fixes: #12967
2024-03-04test cases/common/103 has header symbol: fix for musl 1.2.5Alyssa Ross
musl 1.2.5 exposes this symbol in the default profile, and in future will expose it unconditionally, as it is on track to becoming part of POSIX. So rather than maintaining a list of systems to run this on, let's just skip testing the feature test macro if we find ppoll in the default profile.
2024-02-26Condense directory names for RC1.Jussi Pakkanen
2024-02-25compilers: Add test for correct forwarding of flags to MSVC's Clang linkersL. E. Segovia
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-23env.unset methodCharles Brunet