Commit Graph

9972 Commits

Author SHA1 Message Date
Carlos Bederian c3b3dc598e compilers/cuda: Use format_map(mapping) instead of format(**mapping) 2020-10-16 18:18:46 +02:00
Carlos Bederian 71be873be2 Add CUDA compiler header symbol tests 2020-10-16 18:18:46 +02:00
Carlos Bederian f09457a1e8 compilers/cuda: Fix has_header_symbol check 2020-10-16 18:18:46 +02:00
Xavier Claessens bcf369ea3c Fix consistency in variables kwarg
Share common code to extract the `variables` kwarg in
declare_dependency() and pkg.generate().
2020-10-16 18:09:56 +03:00
Xavier Claessens 2e80c52129 windows: Avoid target name clash happening in GTK+ 2020-10-15 23:07:29 +03:00
mimi89999 4d140eb830 gnome: generate cpp gresource source in cpp projects
Closes #7839
2020-10-15 08:09:51 -04:00
Daniel Mensinger 7c377e5a5d intro: Add extra_files key to intro output (fixes #7310) 2020-10-15 01:56:59 +03:00
Jussi Pakkanen 30d78f3981
Merge pull request #6968 from xclaesse/auto-promote
Merge wraps from subprojects into wraps from main project
2020-10-14 19:40:34 +03:00
Peter Harris 8b8a610ea4 vs: add static_from_buildtype to b_vscrt 2020-10-14 19:35:28 +03:00
Xavier Claessens 3a01823786 wrap: Add 'redirect' type and use it when auto promote 2020-10-13 17:55:16 -04:00
Xavier Claessens 173c115834 Add wrap mode to disable auto promote 2020-10-13 17:55:16 -04:00
Xavier Claessens a20d7ad67d wrap: Use sub-subproject packagefiles 2020-10-13 17:55:16 -04:00
Xavier Claessens 8281bd9e23 interpreter: Improve message when fallback dependency is not found
- Log the message before raising the exception.
- Add a reason when the dependency is not found because the subproject
  failed to configure, because it was not obvious in the case the
  subproject failed to configure earlier while looking for an optional
  dependency.
- Avoid double message when the subproject has overriden the dependency
  and we provided the fallback variable as well.
2020-10-13 17:55:16 -04:00
Xavier Claessens 6333ee88c1 Merge wraps from subprojects into wraps from main project
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.
2020-10-13 17:55:16 -04:00
Xavier Claessens 311a07c39a interpreter: Rename dirname to subp_name
dirname is confusing because the name of a subproject does not always
match its directory name, the wrap file can define another directory.
For example foo.wrap will often extract the subproject into foo-1.2
directory, in that case the subproject name is 'foo' and the subproject
directory is 'foo-1.2'.
2020-10-13 17:53:05 -04:00
Daniel Mensinger e36f713a7f include_type: Add CMake subporject dependency method (fixes #6879) 2020-10-13 23:51:25 +03:00
Daniel Mensinger e00df9046d include_type: honor include_type in dependency fallbacks (fixes #7503) 2020-10-13 23:51:25 +03:00
Jussi Pakkanen 3372c58ca6
Merge pull request #7816 from mensinda/cmCross
cmake: Cross compilation support
2020-10-13 23:38:51 +03:00
Nirbheek Chauhan 55cf399ff8 mtest: Allow filtering tests by subproject
You could always specify a list of tests to run by passing the names as
arguments to `meson test`. If there were multiple tests with that name (in the
same project or different subprojects), all of them would be run. Now you can:

1. Run all tests with the specified name from a specific subproject: `meson test subprojname:testname`
1. Run all tests defined in a specific subproject: `meson test subprojectname:`

Also forbid ':' in test names. We already forbid this elsewhere, so
should not be a big deal.
2020-10-13 19:01:15 +03:00
Daniel Mensinger f5c9bf96b3
cmake: Add cross docs 2020-10-13 17:04:20 +02:00
Daniel Mensinger b27af7e465
cmake: Add cross tests 2020-10-13 17:04:20 +02:00
Daniel Mensinger 7e58f33376
cmake: Add cross compilation support 2020-10-13 17:04:19 +02:00
Xavier Claessens dccff1f2bc msubprojects: Handle wrap-file to wrap-git case 2020-10-13 11:12:49 +00:00
Xavier Claessens 3ade5bbd92 msubprojects: Handle change of URL in wrap-git 2020-10-13 11:12:49 +00:00
Daniel Mensinger 47046c3fb9 ci: fix fedora image 2020-10-13 00:30:31 +02:00
Daniel Mensinger 392bdcbddd cuda: Also read CUDART_VERSION from cuda_runtime_api.h 2020-10-13 00:30:31 +02:00
Daniel Mensinger f6b346f2e2 ci: Add an interactive mode (testTTY) for the CI image builder 2020-10-13 00:30:31 +02:00
Michele Dionisio eef880f509 exclude generated file from clang-tidy processing
by default run_clang_tidy process al file in compile_commands.json but
the file generated has to be esclude like already done from
manual_clangformat
2020-10-12 18:17:15 +03:00
Jussi Pakkanen aae23dfff3
Merge pull request #7740 from bonzini/fallback-false
Allow blocking/forcing automatic subproject search
2020-10-12 17:50:14 +03:00
Camilo Celis Guzman ba71fde186 mtest: collect failures regardless of colorized console 2020-10-12 00:51:21 +03:00
Daniel Mensinger 96c31d9dbc typing: fix mypy typing error 2020-10-12 00:23:59 +03:00
Jussi Pakkanen 7b1cc95c7f Update wrap maintenance documentation. [skip ci] 2020-10-10 22:14:34 +02:00
Sahnvour f80dcb4f33 add test case for #6365 2020-10-10 04:28:16 +00:00
Sahnvour 206e9e5097 Properly handle the case of linking static library with custom targets 2020-10-10 04:28:16 +00:00
Paolo Bonzini 726b822054 dependency: support boolean argument "allow_fallback"
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.
2020-10-08 12:24:07 +02:00
Paolo Bonzini 1eec5cf41f interpreter: clean up handling of force_fallback
Force_fallback is not an interpreter keyword argument, and there
is no reason to handle it as one since it is not used anywhere
else (and in fact is explicitly ignored by get_dep_identifier).
Use a Python keyword argument instead, which makes the code
simpler.
2020-10-08 12:23:46 +02:00
Paolo Bonzini 862bc146a8 interpreter: refactor handling of dependency(fallback: ...) 2020-10-08 11:12:36 +02:00
Paolo Bonzini a4f1caa405 docs: improve documentation of subproject fallback
Automatic fallback to subprojects is complicated and should be
pointed out outside the "fallback" keyword argument.  It is also
surprising that fallback to a subproject will not happen if
override_dependency has already been used with the request
dependency.  Document all this.
2020-10-08 11:11:15 +02:00
Xavier Claessens 9295aedb8d Tests: py.dependency() now has required:true by default
It used to ignore the required argument and got fixed to be consistent
with dependency() function.
2020-10-07 19:08:17 +02:00
Jussi Pakkanen 1a0603835e Add win_subsystem kwarg. Closes #7765. 2020-10-07 18:55:25 +03:00
Xavier Claessens 8b20852b0f python.dependency() is not respecting 'required' kwarg 2020-10-06 19:15:59 -04:00
Dylan Baker 88fecedc77 environment: provide a more detailed explanation of linker detection failures
Just saying "it failed" is accurate, but not useful to helping someone
figure out why it failed. Giving them the stdout and stderr (like we
might with compilers) should help people resolve the issue.

Fixes: #7173
2020-10-06 23:06:28 +03:00
Vinson Lee 5d7069664b compilers: Enable C++20 for Intel C++ Compiler.
Intel C++ Compiler 19.1 has C++20 features.

https://software.intel.com/content/www/us/en/develop/articles/intel-c-compiler-191-for-linux-release-notes-for-intel-parallel-studio-xe-2020.html

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2020-10-06 22:11:34 +03:00
Dylan Baker 94ac51fdda options: Handle updates to choices in options
Currently if you change the `choices` field in the meson_options.txt
file, no update will be done until `meson setup --wipe` is called. Now
if the choices change then the options will be properly merged.

If the currently select value is still valid it is guaranteed to be
kept, if it is now invalid the new default value will be used and a
warning will be printed.

Fixes #7386
2020-10-05 23:10:35 +03:00
Bernd Busse c4fa876925 Never run clang-format / clang-tidy against directories
`pathlib.Path.glob()` also returns directories that match source
filenames (i.e. a directory named `test.h/`), but `clang-format` and
`clang-tidy` fail when handed a directory. We manually skip calling
`clang-format` and `clang-tidy` on those directories.
2020-10-05 23:07:20 +03:00
Dylan Baker 4b1c1d83c8 machinefiles: Allow keys to be stored case insensitive
This is required to make the various keys in the [user options] section
work the same as they do in the meson_options.txt file, where we don't
have any rules about case sensitivity.

There is some risk here. Someone may be relying on this lower by default
behavior, and this could break their machine files.

Fixes #7731
2020-10-05 08:59:45 -04:00
Roman Bolshakov 30a102d9a3 linkers: Drop -pie on macOS
Projects that specify b_pie=true clutter build logs with the warning:

  clang: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]

No option is needed to produce PIE binaries because ld64 is making PIE
executables on 10.7 and above by default, as documented in ld(1).

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
2020-10-04 20:16:49 +03:00
Oskar Sigvardsson 962ea8053b Added subdir files test 2020-10-04 14:52:28 +02:00
Oskar Sigvardsson 1d443f1bc6 Fixed using files object in subdir with xcode backend
Fixes bug #589. When generating string from file object, it didn't take subdir
into account.
2020-10-04 14:52:28 +02:00
Daniel Mensinger 1dfaccfd91 pathlib: Fix resolve() by overriding it in Python 3.5 2020-10-04 10:45:48 +02:00