Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
These are both way more compilcated than they needed to be, this is a
much simpler implementation, and is shared between cross and external
properies.
|
|
Currently InstallDir is part of the interpreter, and is an Interpreter
object, which is then put in the Build object. This is a layering
violation, the interperter should have a Holder for build data. This
patch fixes that.
|
|
A sub-subproject can be configured directly from
`subprojects/foo/subprojects/bar/` in the case `bar` is in the same git
repository as `foo` and not downloaded separately into the main
project's `subprojects/`. In that case the nested subproject violation
code was wrong because it is allowed to have more than one "subprojects"
in path (was not possible before Meson 0.56.0).
Example:
- self.environment.source_dir = '/home/user/myproject'
- self.root_subdir = 'subprojects/foo/subprojects/bar'
- project_root = '/home/user/myproject/subprojects/foo/subprojects/bar'
- norm = '/home/user/myproject/subprojects/foo/subprojects/bar/file.c'
We want `norm` path to have `project_root` in its parents and not have
`project_root / 'subprojects'` in its parents. In that case we are sure
`file.c` is within `bar` subproject.
|
|
So that editors that can fold code (vim, vscode, etc) can correctly fold
functions, instead of getting confused by code that doesn't follow the
current indention. Also, it makes the code easier to read.
|
|
|
|
When glib is a subproject we should use glib-compile-resources it
overrides using find_program() in the case it is not installed on the
build machine. With old glib version we have to run
glib-compile-resources at configure time to generate the list of
dependencies, but not when glib is recent enough.
|
|
Share common code to extract the `variables` kwarg in
declare_dependency() and pkg.generate().
|
|
wraps from subprojects are now merged into the list of wraps from main
project, so they can be used to download dependencies of dependencies
instead of having to promote wraps manually. If multiple projects
provides the same wrap file, the first one to be configured wins.
This also fix usage of sub-subproject that don't have wrap files. We can
now configure B when its source tree is at
`subprojects/A/subprojects/B/`. This has the implication that we cannot
assume that subproject "foo" is at `self.subproject_dir / 'foo'` any
more.
|
|
Sometimes, distros want to configure a project so that it does not
use any bundled library. In this case, meson.build might want
to do something like this, where slirp is a combo option
with values auto/system/internal:
slirp = dependency('', required: false)
if get_option('slirp') != 'internal'
slirp = dependency('slirp',
required: get_option('slirp') == 'system')
endif
if not slirp.found()
slirp = subproject('libslirp', ...) .variable('...')
endif
and we cannot use "fallback" because the "system" value should never
look for a subproject.
This worked until 0.54.x, but in 0.55.x this breaks because of the
automatic subproject search. Note that the desired effect here is
backwards compared to the policy of doing an automatic search on
"required: true"; we only want to do the search if "required" is false!
It would be possible to look for the dependency with `required: false`
and issue the error manually, but it's ugly and it may produce an error
message that looks "different" from Meson's.
Instead, with this change it is possible to achieve this effect in an
even simpler way:
slirp = dependency('slirp',
required: get_option('slirp') != 'auto',
allow_fallback: get_option('slirp') == 'system' ? false : ['slirp', 'libslirp_dep'])
The patch also adds support for "allow_fallback: true", which is
simple and enables automatic fallback to a wrap even for non-required
dependencies.
|
|
Also add a failing test case for that error.
|
|
|
|
|
|
Dependency 'foo' is overriden with 'foo_dep' so using fallback variable
name 'bar_dep' should abort.
|
|
|
|
This reverts commit 0871b1032c53287a1ed3ce5108799fb0daccaec5, reversing
changes made to 9dc3ca2c1c9fbb47e731551c6432df144f725261.
|
|
Make the expected output check mandatory for failing-meson and warning-meson tests
|
|
|
|
We need to test both "have pkg-config" and "don't have pkg-config"
pathways on macOS, which is why pkg-config was only installed in one
branch based on --unity=on/off.
|
|
Initially produced using:
for d in "test cases/failing/"* ; do rm -r _build ; ./meson.py setup "$d" _build | grep ERROR >"$d"/expected_stdout.txt; done
then converted to json with jq using:
jq --raw-input --slurp 'split("\n") | {stdout: map({line: select(. != "")})}' expected_stdout.txt >test.json
or merged with existing json using:
jq --slurp '.[0] + .[1]' test.json expected.json >test.json.new
v2:
Add some comments to explain the match when it isn't totally obvious
v3:
Add or adjust existing re: in expected output to handle '/' or '\' path
separators appearing in message, not location.
v4:
Put expected stdout in test.json, rather than a separate expected_stdout.txt file
Park comments in an unused 'comments' key, as JSON doesn't have a syntax for comments
|
|
|
|
|
|
|
|
|
|
Add add_languages(native:)
|
|
This change made `5 dependency versions` unit test fail because now once
a subproject has been configured, the fallback variable is checked to be
consistent. So it has to use new subproject because 'somesub' was
already configured by previous tests.
|
|
Consistently report file locations relative to cwd
|
|
Fix various failing-meson tests
|
|
|
|
|
|
This test was never testing what it claimed to test, simply failing with
"ERROR: No C-like compilers are available, cannot find the framework"
because a C-like language is missing from project().
|
|
These are always failing just because the exact version constraint isn't
satisfied, e.g. "ERROR: Meson version is 0.53.999 but project requires
0.48.0"
|
|
This test was never testing what it claimed to test, simply failing with
'ERROR: First statement must be a call to project' because it's missing
project().
Since #5279, all unrecognized escape sequences are literal, so I don't
think there's anything to test here.
|
|
Currently they are just failing trying to install a non-existent file.
|
|
Currently this test is just failing due to an unexpected positional
argument, as the (deprecated) keywordless run_target() was removed in
0.45.0
|
|
|
|
|
|
Add a test that trying to use a compiler in a target for a language
which hasn't been mentioned in project() or add_languages() gives an
error.
|
|
Add a test that trying to use a native compiler in a target after it's
been tentatively added with add_languages() without native: but isn't
actually available gives an error.
|
|
|
|
|
|
|
|
|
|
Added two new failing tests.
|
|
|
|
* Failing test case for trying to install_data a custom_target
* Validate install_data() arguments are either string or file
|
|
So it failing tests what it claims, rather than that an directory
without a meson.build fails...
|