| Age | Commit message (Collapse) | Author |
|
This can come in handy for instance when a custom target creates both
headers and sources. Slicing the output of a `to_list()` call provides
convenient access to just the headers or just the sources.
|
|
|
|
|
|
|
|
|
|
This is a new attribute released in GCC 15 and clang 18. It isn't
supported in C++ compilers at the moment.
|
|
Extracted from https://github.com/mesonbuild/meson/pull/15230
Co-authored-by: Charlie Hutcheson <chaz.hutcheson@gmail.com>
|
|
In case of python and especially in the case of pyInstaller
where the python command is meson.exe runpython, it should
not be full path to be used but cmd_array.
Fixing #13834
|
|
Place the build products in a directory of the specified name
somewhere within the build directory. This allows use of the target
that includes a specific directory name:
#include <subdir/configure.h>
This also allows creating targets with the same basename by using
different subdirectory names.
v2:
Move build_subdir to Target class.
Error if path separator in build_dir
v3:
Rename to 'build_subdir' to make it clear that the name is
appended to a meson-specific build directory, and does not
provide the user with a way to define the overall meson build
hierarchy.
Allow build_subdir to include path separators.
Support 'build_subdir' for configure_file.
build_subdir must not exist in the source directory and
must not contain '..'
Add documentation and tests
v4:
Rebase and prepare for version 1.9.1
Add failing test case when build_subdir is present in the
project.
Add release note snippet
v5:
Clarify wording on restrictions on the value of build_subdir. Use
the same wording in each place this restriction is described.
v6:
Move path validation to shared function, validate_build_subdir,
instead of duplicating the tests in two places.
v7:
Update version numbers to 1.10.0
Add TypedDict updates.
Remove spurious build_subdir instance variable
v8:
Oops, missed one version number update.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
We don't always check if a library is actually linkable because of concerns
that a library may not be standalone, so linking against it may still have
unresolved references. We can workaround that by building a shared library
as a test rather than an executable, and in fact we already do that in a
bunch of cases since bb5f2ca3da821d7a8e865cd55a8d5d638e0aab22.
This comes up in particular with Fedora and dependency('atomic') because
on x86_64, they provide a libatomic.so linker script (so our file existence
check passes), but trying to use it later on will fail if the backing package
isn't installed.
_get_file_from_list has not been deleted because the Ninja backend's
guess_library_absolute_path uses it. We might be able to change it to
also use a link test but I've left that alone.
Test notes:
* The _test_all_naming unittest has been tweaked because we were using a
blank file rather than an actual shared library, which (as expected),
now fails.
* I've also added a test for dependency('atomic') providing a result that
can actually be linked against. I've not made it check generally whether
dependency('atomic') finds something when we expect to (at least for now)
as it'll involve some CI whack-a-mole.
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=2352531
Bug: https://github.com/mesonbuild/meson/issues/14946
Closes: https://github.com/mesonbuild/meson/issues/10936
|
|
Fixes: #12519
|
|
This reverts https://github.com/mesonbuild/meson/pull/15107
Explicit objections regarding the design were raised and not answered,
so it shouldn't have been merged. It needs to be discussed and
revisited.
|
|
|
|
|
|
Fix the original bug fix for #13950 to only warn
about empty required strings, instead of failing
the entire build. This will simplify the workflow
for users that build the string from a possibly
empty list, and save them the need for the added
if-check.
Signed-off-by: Eyal Itkin <eyal.itkin@gmail.com>
|
|
The parent `__init__` was setting cached_version back to None.
This fixes a regression caused by
https://github.com/mesonbuild/meson/pull/8885.
|
|
This reverts commit 9b1eb8b8ed434d1c2fdca0d8ac46b79c9b91bb0f.
It is not needed anymore since the pre-1.8 semantics were the
good ones.
Only leave in place the new and clearer testcase names.
|
|
This reverts commit 5ab871be5287aa5cce1e8dfdfb7c4a6b07b4f2f7.
It is not needed anymore since the pre-1.8 semantics were the
good ones.
|
|
If a subproject had its SubprojectHolder created, but was disabled, its options were not
parsed; therefore the subproject should not be checked for unknown options.
Fixes: #14969
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
Can be tested with adding -stdlib=libc++ to C++ flags.
In file included from /usr/include/c++/v1/stdio.h:93:
In file included from /usr/include/c++/v1/__config:14:
In file included from /usr/include/c++/v1/__configuration/abi.h:15:
/usr/include/c++/v1/__configuration/platform.h:35:7: error: function-like macro '__has_include' is not defined
35 | # if __has_include(<features.h>)
| ^
/usr/include/c++/v1/__configuration/platform.h:48:5: error: function-like macro '__has_include' is not defined
48 | #if __has_include(<picolibc.h>)
| ^
1 warning and 2 errors generated.
'
|
|
The compiler and linker argument options are special and are only
added when the compiler is first discovered. Thus any project-specific
values in a child project will remain sitting in pending_options
after initialize_from_subproject_call; coredata needs to inform
the option store that they now exist.
Fixes: #14939
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
If the parent project has not enabled a language, the child project's
project-specific compiler option values are sitting in pending_options
after initialize_from_subproject_call, and the option store has to be
informed that they now exist.
Fixes: #14939
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This reverts commit 651aede977179c5fe382744e3dd91ca8e01d050c.
This was most certainly not acceptable.
|
|
|
|
We might run into an assertion failure down the road, if we don't fail
here. Specifically
project('proj')
executable('bin', 'header.h')
will throw during the ninja generation.
|
|
If main project finds a directory subprojects/foo with no corresponding
foo.wrap, it creates a dummy PackageDefinition for it. If we later find
a subproject that has foo.wrap, replace the dummy wrap with it.
This happens for example when wrap-redirect have been deleted. It also
happens for subprojects downloaded from some Cargo.lock which does not
create a wrap-redirect.
Avoid loading the same location twice, which can happen when preparing
cargo subprojects.
|
|
When giving a dependency object as requires, allow to use the dependency from a
subproject (that is an InternalDepdency).
|
|
Commit eca1ac18dc1978b15b500c9f1710c05cb1ccc0ec (#14252) added support
for properly detecting the -Wno-vla-larger-than flag: a value must be
specified for its positive form (-Wvla-larger-than=N), or GCC will exit
with the error "missing argument to ‘-Walloc-size-larger-than=’".
There is a handful of other -Wno-* flags whose positive form act in the
same manner, but are not covered here:
* -Wno-alloc-size-larger-than (GCC >=7.1.0)
* -Wno-alloca-larger-than (GCC >=7.1.0)
* -Wno-frame-larger-than (GCC >=4.4.0)
* -Wno-stack-usage (GCC >=4.7.0)
Add logic to treat these in the same way.
Signed-off-by: Henrik Lehtonen <eigengrau@vm86.se>
|
|
|
|
|
|
|
|
This allows users to do two things, flatten potentially nested arrays
themselves, and, to safely convert types that may be an array to not an
array.
```meson
x = [meson.get_external_property('may_be_array)].flatten()
```
```meson
x = ['a', ['b', 'c']]
assert(x.flatten() == ['a', 'b', 'c'])
```
|
|
It is impossible to detect the source of default_library=both from within the
test, so add yet another knob... :(
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
The test covers overriding an option from the dependency() function.
If the same option is passed on the command line, it overrides the
dependency()'s default_options as well.
Tweak the description of the unittests that uses the same sources.
The tests pass, but I am not sure they should. For example in
the second test the default_library=both setting in the machine file
should have the same effect as the -D option (machine files have lower
priority than command line, but higher priority than anything in meson.build
files).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Starting with Meson 1.8.0, "meson configure" prints some options as
":foo" instead of "foo". Print the option as it was passed by the
user.
While at it, make errors more consistent and/or correct (e.g.
"Unknown option" instead of "Unknown options").
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
it uses the existing 14 configure file test case to configure
config 7 and 10 with cmake and meson and then compares the
relevant output to see if they are equal
|
|
cmake does preprocessing in a linear pass through the entire file
this allows recursive variable lookups which cannot be supported
by a basic regex implementation.
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Fixes #14270.
|
|
|
|
|
|
Cover ":foo" syntax in default_options as well.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
This actually tests the handling of deprecated options
when passed to meson instead of just as default_options.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
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
|