Commit Graph

1397 Commits

Author SHA1 Message Date
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
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
Jussi Pakkanen 7b1cc95c7f Update wrap maintenance documentation. [skip ci] 2020-10-10 22:14:34 +02: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 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
Jussi Pakkanen 1a0603835e Add win_subsystem kwarg. Closes #7765. 2020-10-07 18:55:25 +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
Nirbheek Chauhan 264939963f docs: Fixup find_program search path documentation [skip ci]
It was slightly wrong, and also make it a bullet point for easier
parsing.
2020-10-02 09:38:35 +00:00
Dylan Baker 20663564bd deprecated get_configtool_variable and get_pkgconfig_variable
The get_variable method is able to do everything they do and more,
making it generally more useful. Let's tell people to stop using the old
ones.
2020-10-01 12:35:42 -07:00
Rasmus Thomsen 1d04caff29 Document search order of find_program 2020-10-01 13:42:56 -04:00
Alexandros Theodotou a65fffd127 document keys() method of dictionary object [skip ci] 2020-10-01 09:21:46 -04:00
Dylan Baker 5aee8567b8 dependencies/curses: Add a system dependency
That calls find_library and has_header in conjunction to look for curses
implementations that are baked into the system without any other find
method.
2020-09-29 14:58:32 -07:00
Dylan Baker 7d11d7cf68 dependencies/curses: Add support for using the ncurses config tools
These are mostly duplicated with pkg-config, but maybe someone has one
but not another, and they're easy to turn on with the
ConfigToolDependency.
2020-09-29 14:58:32 -07:00
Dylan Baker 16d3513df6 docs/Dependencies Add missing curses documentation 2020-09-29 14:58:32 -07:00
Dylan Baker 137c3124e2
Merge pull request #7758 from dcbaker/submit/hdf5-factory
dependencies/hdf5: Convert to a dependency_factory
2020-09-29 14:55:38 -07:00
Jussi Pakkanen 5f70984403
Merge pull request #7772 from xclaesse/deprecate-source-root
Deprecate meson.build_root() and meson.source_root()
2020-09-29 19:24:25 +03:00
Jon Turney ff186b0526 Improve documentation about using shell in custom_target() [skip ci]
Add a note about the portability of using shell constructs in the
custom_target() command.
2020-09-29 19:22:50 +03:00
Jussi Pakkanen 01edd26baf Add old style command to tutorial. Closes #7793. [skip ci] 2020-09-28 18:26:29 +03:00
Xavier Claessens 7176b74fd6 Add meson.project_build/source_root() methods 2020-09-28 11:22:38 -04:00
Dylan Baker 54329eeed7 dependencies/hdf5: Use the correct compilers for the machine
Instead of the default ones, this is especially important when cross
compiling or when using compilers that aren't compatible with the
default ones.
squash! dependencies/hdf5: Use the actual system compilers
2020-09-25 11:11:46 -07:00
Dylan Baker b7cb30e175 dependencies/hdf5: Convert to a dependency_factory
Instead of a mega dependency that does everything, use a dependency
factory for config-tool and pkg-config
2020-09-25 11:11:46 -07:00
Xavier Claessens 55ea461993 Deprecate meson.build_root() and meson.source_root()
Those function are common source of issue when used in a subproject because they
point to the parent project root which is rarely what is expected and is a
violation of subproject isolation.
2020-09-23 12:14:32 -04:00
Nirbheek Chauhan 94ea9d97be docs: Clarify what literal strings mean [skip ci]
Someone on IRC was confused by this paragraph.
2020-09-21 15:36:24 +05:30
Jussi Pakkanen 13a8e1d26e Improve docs for creating new wraps. [skip ci] 2020-09-21 01:48:30 +03:00
Sebastian Meyer a24fde6fde
Add support for the CompCert C Compiler
* Add preliminary support for the CompCert C Compiler

The intention is to use this with the picolibc, so some GCC flags are
automatically filtered. Since CompCert uses GCC is for linking, those
GCC-linker flags which are used by picolibc, are automatically prefixed
with '-WUl', so that they're passed to GCC.

Squashed commit of the following:

commit 4e0ad66dca9de301d2e41e74aea4142afbd1da7d
Author: Sebastian Meyer <meyer@absint.com>
Date:   Mon Aug 31 14:20:39 2020 +0200

    remove '-fall' from default arguments, also filter -ftls-model=.*

commit 41afa3ccc62ae72824eb319cb8b34b7e6693cb67
Author: Sebastian Meyer <meyer@absint.com>
Date:   Mon Aug 31 14:13:55 2020 +0200

    use regex for filtering ccomp args

commit d68d242d0ad22f8bf53923ce849da9b86b696a75
Author: Sebastian Meyer <meyer@absint.com>
Date:   Mon Aug 31 13:54:36 2020 +0200

    filter some gcc arguments

commit 982a01756266bddbbd211c54e8dbfa2f43dec38f
Author: Sebastian Meyer <meyer@absint.com>
Date:   Fri Aug 28 15:03:14 2020 +0200

    fix ccomp meson configuration

commit dce0bea00b1caa094b1ed0c6c77cf6c12f0f58d9
Author: Sebastian Meyer <meyer@absint.com>
Date:   Thu Aug 27 13:02:19 2020 +0200

    add CompCert to meson (does not fully work, yet)

* remove unused import and s/cls/self/

fixes the two obvious LGTM warnings

* CompCert: Do not ignore unsupported GCC flags

Some are safe to ignore, however, as per
https://github.com/mesonbuild/meson/pull/7674, they should not be
ignored by meson itself. Instead the meson.build should take care to
select only those which are actually supported by the compiler.

* remove unused variable

* Only add arguments once.

* Apply suggestions from code review

Co-authored-by: Dylan Baker <dylan@pnwbakers.com>

* Remove erroneous ' ' from '-o {}'.format()

As noticed by @dcbaker

* added release note snippet for compcert

* properly split parameters

As suggested by @dcbaker, these parameters should be properly split into multiple strings.

Co-authored-by: Dylan Baker <dylan@pnwbakers.com>

* Update add_compcert_compiler.md

Added a sentence about the state of the implementation (experimental); use proper markdown

* properly separate arguments

Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
2020-09-15 21:51:21 +03:00
Xavier Claessens 67c0ec1640 InternalDependency: Add as_link_whole() method 2020-09-14 20:32:22 -04:00
Xavier Claessens 9d338200da external-project: New module to build configure/make projects
This adds an experimental meson module to build projects with other
build systems.

Closes: #4316
2020-09-13 13:54:47 -04:00
Xavier Claessens 14c1a6983d msubprojects: Allow comma separated list of types 2020-09-10 11:39:30 -04:00
Xavier Claessens a3ac25b0c3 msubprojects: Fix review comments 2020-09-10 11:39:30 -04:00
Xavier Claessens 1101144d86 doc: Update new `meson subprojects` behaviors 2020-09-10 11:39:30 -04:00
Jon Turney 1480fdfa9a Add release note snippet 2020-09-10 07:20:41 +00:00
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.
2020-09-10 07:20:41 +00:00
Daiki Ueno 7ad66e8a1a docs/Users: add p11-kit [skip ci]
Signed-off-by: Daiki Ueno <ueno@gnu.org>
2020-09-07 11:24:07 +02:00
Michal Sojka 28f15390b9
doc: Add missing method arguments [skip ci]
Documentation of most methods mentions method arguments enclosed in
parentheses. Two methods are an exception and we fix them here to make
the manual more consistent.
2020-09-06 20:26:14 +03:00
Krzysztof Małysa 49b3182748 docs: Fix typo in Reference-manual.md [skip ci] 2020-09-05 16:56:28 -04:00
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>
2020-09-04 14:45:20 +02:00
Nirbheek Chauhan bfb8d25deb docs: Add a snippet for python 3.5 deprecation [skip ci] 2020-09-02 16:29:39 +00:00
Daniel Berrangé 0ec8bebae8 Add Entangle application to list of apps using Meson
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-09-02 12:00:51 +02:00
Michael Brockus 0755be5048 Add some forgotten values for "cpp_std" [skip ci] 2020-09-02 11:06:06 +02:00
Sebastian Engel ac8cc2106f Clarify the use of -Doption and alternatives [skip ci]
The -Doption=value style argument works for all builtin options,
and compiler options passed to meson. And some universal options,
have additional ways to be passed. However, base options (and compiler
options) do not have exactly the same ways of passing as universal
options.

This change adds a few pieces of information, which might get lost,
if the manual is not read serially.

[skip ci]
2020-08-30 23:38:51 +03:00
Daniel Mensinger 17439fa3e8 test: Add 'dir' support for installed files in test.json
This is useful for automatically generated docs (doxygen, hotdoc)
with a lot of generated files that may differ with different
versions of the generator.
2020-08-27 00:08:57 +00:00
Jussi Pakkanen 3a25efc056
Merge pull request #7581 from peterh/aix
Add AIX support
2020-08-25 23:58:17 +03:00
Eli Schwartz 1de1cc22e2 qt module: add qresource support to compile_translations
A common pattern in Qt5 applications is to embed translations in the
executable using the qresource system. In this case, the list of
translation files is already available in the .qrc file and there's no
good reason to duplicate this info in meson.build.

Let compile_translations optionally take a qrc input, in which case it
will go straight to generating the relevant translations and
rcc-generated .cpp, and directly return the thing users actually care
about -- the .cpp for linking.
2020-08-25 23:46:45 +03:00
Jussi Pakkanen fc13c90de3
Merge pull request #7600 from alexrp/master
Add C2x option support.
2020-08-23 00:26:44 +03:00
Alex Rønne Petersen 450155110c Add C2x option support. 2020-08-22 18:57:05 +02:00
Jussi Pakkanen c42298e146
Merge pull request #7447 from scivision/nvc
Add support for NVidia HPC SDK compilers
2020-08-22 18:31:56 +03:00
noasakurajin fbc6d50acc
added VS Code/Codium extention [skip ci] 2020-08-22 14:38:45 +03:00
Paolo Bonzini 01724071ee Virtualization 💖 Meson [skip ci]
There are a couple new users of Meson that might be worth mentioning.
502 commits later, Libvirt and QEMU have both switched!

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 12:54:42 -04:00
Xavier Claessens 1c403e20e7 Interpreter: Fix c_stdlib usage
- Exceptions raised during subproject setup were ignored.
- Allow c_stdlib in native file, was already half supported.
- Eliminate usage of subproject variable name by overriding
  '<lang>_stdlib' dependency name.
2020-08-18 14:47:38 -04:00