Xavier Claessens
98d445a070
msubprojects: Support git subprojects with no wrap file
...
User could have cloned manually a subproject.
5 years ago
Xavier Claessens
3d443d84bd
msubprojects: Use less cryptic "git branch --show-current" command
...
It describes well what it does, compared to obscure "rev-parse".
5 years ago
Xavier Claessens
400a35e9ea
msubprojects: Add --type argument
...
It is often desired to only update git repositories and not pull
files from wrapdb.
5 years ago
Xavier Claessens
7ba0035db7
msubprojects: Use wrap.Resolver() to load all PackageDefinition
...
Besides being simpler, it has the advantage of picking directories that
don't have a .wrap file assotiated.
5 years ago
Nirbheek Chauhan
9fb839687b
minstall: Add version field to install data
...
And check the install data in the same way that mtest checks
serialisation data.
Fixes https://github.com/mesonbuild/meson/issues/2354
5 years ago
Nirbheek Chauhan
8bb3f16f09
mtest: Refactor test data checking
5 years ago
Nirbheek Chauhan
fb7099c6cf
mtest: Check version in the test data after loading
...
Same as coredata.dat and build.dat loading. Also, do not assert if
things change. Raise the appropriate exception.
Fixes https://github.com/mesonbuild/meson/issues/7613
5 years ago
Jon Turney
79b2eeb1ba
Identify machine in error accesing compiler object for missing language
...
Also add a failing test case for that error.
5 years ago
Jon Turney
7996ca3d55
ninja: Generate all STATIC_LINKER rules
...
Don't stop generating STATIC_LINKER rules at the first MachineChoice
which isn't available (i.e. generate a STATIC_LINKER rule, even if
STATIC_LINKER_FOR_BUILD isn't needed)
Also warn about internal errors which lead to non-existent rule
references, rather than exploding with a KeyError.
5 years ago
Jon Turney
fc0f0df74b
Don't require build machine compilers for project() languages
...
This means that, in the common case of a simple meson.build which
doesn't contain any 'native: true' targets, we won't require a native
compiler when cross-compiling, without needing any changes in the
meson.build.
5 years ago
Daniel Mensinger
4cef45af21
cmake: fix shared_module dependency ( fixes #7715 )
5 years ago
Jon Turney
d712c86a62
Implement add_languages(native:) in introspector
5 years ago
Daniel Mensinger
057c77f7d0
typing: fixup for #7708
5 years ago
Daniel Mensinger
8f95efe40b
typing: fixup of #7688
...
This bug not beeing caught in review is another reason for
adding strict typing support to meson.
5 years ago
Daniel Mensinger
4253bf6281
typing: Fix code review
5 years ago
Daniel Mensinger
1743f636fd
typing: fix LGTM bot error
5 years ago
Daniel Mensinger
e681235e5f
typing: fix code review
5 years ago
Daniel Mensinger
47373a2438
typing: get rid of most T.cast
5 years ago
Daniel Mensinger
23818fc5a3
typing: more fixes
5 years ago
Daniel Mensinger
1b19822a2d
typing: Fix templates
5 years ago
Daniel Mensinger
62f7642a61
typing: fix dependencies for new follow_imports
5 years ago
Daniel Mensinger
ca1878ffb5
typing: fix envconfig typing
5 years ago
Daniel Mensinger
3ae13d1dc2
typing: ignore error because of untyped decorator
5 years ago
Daniel Mensinger
0490372449
typing: fully annotate mintro and mtest
5 years ago
Daniel Mensinger
c637b913c9
typing: fully annotate mcompile, minit, and msetup
5 years ago
Daniel Mensinger
6b1b995b32
typing: fully annotate fs module
5 years ago
Daniel Mensinger
3dbfe8f75a
typing: fully annotate arglist
5 years ago
Daniel Mensinger
1217cf9a3b
typing: fully annotate boost and hdf5 deps
5 years ago
Daniel Mensinger
a4f4379c44
typing: fully annotate scripts
5 years ago
Daniel Mensinger
449dd8e72a
typing: fully annotate wrap
5 years ago
Daniel Mensinger
fb9738b8c7
typing: fully annotate mparser.py
5 years ago
Daniel Mensinger
bb09ca9ad5
typing: fully annotate mesonlib.py
5 years ago
Daniel Mensinger
ce042f318e
typing: Add run_mypy.py for easier mypy invocation
5 years ago
Daniel Mensinger
ff28f3fa34
typing: completely type interpreterbase
5 years ago
Daniel Mensinger
3489442848
typing: completely type ast
5 years ago
Daniel Mensinger
9c1e72202d
typing: refactor dict handling
5 years ago
Paolo Bonzini
4ed5c3acbf
IntrospectInterpreter: allow dictionaries with nonconstant keys
...
Something like {a: foo} currently stymies the IntrospectionInterpreter and
breaks introspection of the source directory. The fix is just to walk the keys
and return a dummy dictionary.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
5 years ago
Jon Turney
f94e1eed97
Factor out an _add_languages() function in introspector
...
Factor out an _add_languages() function in introspector, rather than
calling func_add_languages() with arguments crafted to fake an
interpreter call.
5 years ago
Nirbheek Chauhan
eca4c6fcaf
minstall: Print a big FAILED when a script fails
...
We don't run any further scripts when this happens, so we need to
print a big error. The exit code was already correct.
Fixes https://github.com/mesonbuild/meson/issues/7627
5 years ago
Nirbheek Chauhan
863492ae1a
Add some type hints to the ExternalProgram class
5 years ago
Nirbheek Chauhan
757b838d81
Fix picking up tools with args from the env on Windows
...
This was a regression in https://github.com/mesonbuild/meson/pull/7059 .
We do not need to do a full search for all windows special cases. We
only want to check whether the command provided is actually a full
path to a script so we can add the interpreter.
Fixes https://github.com/mesonbuild/meson/issues/7645
5 years ago
James Hilliard
646ae846be
backends: check external rpaths for all languages using ldflags
...
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
5 years ago
Paolo Bonzini
492afe50a4
environment: use ExternalProgram to find ninja
...
This allows the NINJA environment variable to support all the Windows special
cases, especially allowing an absolute path without extension.
Based on a patch by Yonggang Luo.
Fixes : #7659
Suggested-by: Nirbheek Chauhan <nirbheek@centricular.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
5 years ago
Paolo Bonzini
fa5c2363eb
introspect: add test dependencies info to test/benchmark JSON
...
Add the ids of any target that needs to be rebuilt before running the
tests as computed by the backend, to the introspection data for tests and benchmarks.
This also includes anything that appears on the test's command line.
Without this information, IDEs must update the entire build before running
any test. They can now instead selectively build the test executable
itself and anything that is needed to run it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
5 years ago
Michael Hirsch
34f7fee741
fortran: make include scanning also work for CMake subprojects
...
also fixed PEP8
I originally implemented the "include" scanning,
but hadn't made a test for this case
5 years ago
Nirbheek Chauhan
104b80a75c
symbolextractor: Handle PermissionError when running tool
...
I can't reproduce this, but it is definitely possible. In this case
what we should do is the same as when the tool is not found.
Fixes https://github.com/mesonbuild/meson/issues/7605
5 years ago
Nirbheek Chauhan
0448884695
cmake: Don't link DEBUG to CRT when not building with MSVC
...
is_debug doesn't just control the CRT, it also controls the 'debug
configuration' which is unrelated to the CRT setting on non-MSVC.
Fixes https://github.com/mesonbuild/meson/issues/7631
5 years ago
Xavier Claessens
70d2207212
interpreterbase: Fix typing annotation
...
Co-authored-by: Daniel Mensinger <daniel@mensinger-ka.de>
5 years ago
Xavier Claessens
9365486104
Special case meson.version().version_compare() statement
...
when that statement gets evaluated, the interpreter remembers the
version target and if it was part of the evaluation of a `if` condition
then the target meson version is temporally overriden within that
if-block.
Fixes : #7590
5 years ago
Matt Madison
3eab43136c
environment: do not raise exception in detect_cuda_compiler
...
when the compiler is not a string. When the compiler
is set in the build configuration (required, for example,
in a cross-build setup), the compiler setting is already
a list, which is the desired type.
Signed-off-by: Matt Madison <matt@madison.systems>
5 years ago