Commit Graph

578 Commits

Author SHA1 Message Date
Daniel Mensinger 3f1519f2e7
cmake: Deprecate CMake <3.14 and warn for <3.17 (#9677)
* cmake: Deprecate CMake <3.14 and warn for <3.17

See:

- #7832
- #9676

* cmake: Add deprecation release note snippet
2021-12-02 00:41:48 +02:00
Pablo Correa Gómez 4f882ff8ec add install_symlink function
Allows installing symlinks directly from meson, which can
become useful in multiple scenarios. Current main use is to
help moving forward #9557
2021-12-01 13:59:54 -05:00
Luke Elliott 39856daf9a Stop backend_startup_project from erasing the last project in a VS solution
if it is not the specified project.
2021-11-25 18:14:54 +02:00
Crend King 809792c223 Support Visual Studio 2022 backend 2021-11-21 08:08:11 -05:00
Volker Weißmann 2c079d855e Added warning if run_command is called without the check kwarg 2021-10-30 22:26:28 -04:00
Jussi Pakkanen af85738daf
Merge pull request #9375 from dcbaker/submit/windows-module-typing
Typing for the Windows module
2021-10-29 22:45:04 +03:00
Jussi Pakkanen 4840c86ec9 Add sccache support. 2021-10-25 19:59:49 -04:00
Jussi Pakkanen 39c268ce0d Create release notes page for 0.60. 2021-10-24 18:45:35 +03:00
Xavier Claessens 437745b028 Add missing release snippet for option() deprecated kwarg 2021-10-10 16:18:08 -04:00
Xavier Claessens 928078982c Add --vsenv command line option and active VS only when needed 2021-10-10 23:15:18 +03:00
Christian Clauss a5020857f3 Fix typos discovered by codespell 2021-10-10 16:12:25 -04:00
Eli Schwartz 0a3a9fa0c3
ar linker: generate thin archives for uninstalled static libraries
Since they will never be used outside of the build directory, they do
not need to literally contain the .o files, and references will be
sufficient.

This covers a major use of object libraries, which is that the static
library would potentially take up a lot of space by including another
copy of every .o file.

Fixes #9292
Fixes #8057
Fixes #2129
2021-10-10 13:32:22 -04:00
Eli Schwartz 4d9cc9ceab Add release notes for `subprojects packagefiles`. 2021-10-10 10:17:55 -04:00
Dylan Baker 6849baa476 modules/windows: allow CustomTargets with more than one output for compile_resources 2021-10-09 21:34:54 -07:00
Xavier Claessens 329d111709 python: Add platlibdir and purelibdir options 2021-10-08 17:47:35 -04:00
Eli Schwartz 108bd996ee
add install_emptydir function
This replaces the absolute hack of using

```
install_subdir('nonexisting', install_dir: 'share')
```

which requires you to make sure you don't accidentally or deliberately
have a completely different directory with the same name in your source
tree that is full of files you don't want installed. It also avoids
splitting the name in two and listing them in the wrong order.

You can also set the install mode of each directory component by listing
them one at a time in order, and in fact create nested structures at
all.

Fixes #1604
Properly fixes #2904
2021-10-08 14:35:00 -04:00
Dylan Baker bcfbfbb343 modules/gnome: deprecate yelp variadic sources
Yelp currently can take sources two different ways, the first is via
variadic arguments, the second is by a keyword argument. If the keyword
is passed then the variadic arguments are silently ignored, which is
obviously not ideal. Fortunately the variadic form was never documented,
and is likely not in wide use.

This patch fixes it by deprecating the variadic form, and warning if
both are passed. It does not change behavior as someone may be relying
on it.
2021-10-07 09:26:35 -07:00
Xavier Claessens 4deeb907b6 dependency: Allow searching for multiple names 2021-09-30 17:49:15 -04:00
Xavier Claessens d2fa6d5080 Make custom_target() name argument optional 2021-09-30 12:26:19 -04:00
Jussi Pakkanen fa47d8dab0
Merge pull request #9014 from bonzini/mixed-language-link
Use appropriate compiler for the source file for "links" tests with file argument
2021-09-28 17:32:44 +03:00
Jussi Pakkanen f6ae82169c
Merge pull request #8773 from dcbaker/submit/rustc-enhancements-clippy
More enhancements for Rust + clippy support
2021-09-25 14:42:12 +03:00
Daniel Mensinger d93d01b6c5 interpreter: Introduce StringHolder
Another commit in my quest to rid InterpreterBase from all higher
level object processing logic.

Additionally, there is a a logic change here, since `str.join` now
uses varargs and can now accept more than one argument (and supports
list flattening).
2021-09-25 12:44:11 +02:00
Dylan Baker 30202a2402 compilers/rust: Add support for clippy
Clippy is a compiler wrapper for rust that provides an extra layer of
linting. It's quite popular, but unfortunately doesn't provide the
output of the compiler that it's wrapping in it's output, so we don't
detect that clippy is rustc. This small patch adds a new compiler class
(that is the Rustc class with a different id) and the necessary logic to
detect that clippy is in fact rustc)

Fixes: #8767
2021-09-24 18:48:48 -07:00
Dylan Baker 6514abf681 rustc: implement pic args 2021-09-24 18:48:48 -07:00
Dylan Baker d32fc0563d compilers/rust: Implement warning levels
Currently this implements 3 warning levels, 1 and 2 are just the
"default" set by rustc, 3, is "everything is a warning", and 0 is
"nothign is a warning".
2021-09-24 18:48:48 -07:00
Dylan Baker e2260650a0 rust: Add werror arguments 2021-09-24 18:48:48 -07:00
Dylan Baker 68c23a6120 Add option to to transpile Cython to C++
This patch adds a new meson built-in option for cython, allowing it to
target C++ instead of C as the intermediate language. This can, of
course, be done on a per-target basis using the `override_options`
keyword argument, or for the entire project in the project function.

There are some things in this patch that are less than ideal. One of
them is that we have to add compilers in the build layer, but there
isn't a better place to do it because of per target override_options.
There's also some design differences between Meson and setuptools, in
that Meson only allows options on a per-target rather than a per-file
granularity.

Fixes #9015
2021-09-24 22:56:46 +03:00
Eli Schwartz 214d03568f
new custom dependency lookup for iconv
Also internally needed by intl, so add that as a proxied dependency
instead of coding it manually.
2021-09-12 13:45:43 -04:00
Paolo Bonzini 32dbdff3b2 docs: document new behavior with respect to mixed language link tests 2021-09-07 14:18:37 +02:00
Eli Schwartz dc51740e2c
add release note formally allowing run_target in an alias
We've now fixed it so it works, and it provides useful functionality,
e.g. creating a custom target that builds multiple gettext domains in
one action.
2021-09-01 15:42:40 -04:00
Xavier Claessens ea02c1c48a msvc: Assume UTF8 source by default
Currently every project that uses UTF8 for its source files must add
'/utf-8' argument otherwise they don't work non-English locale MSVC.

Since meson.build itself is assumed to be UTF8 by default, seems better
to assume it for source files by default too.

For example:
- https://gitlab.freedesktop.org/gstreamer/gst-build/-/blob/master/meson.build#L62
- https://gitlab.gnome.org/GNOME/glib/-/blob/main/meson.build#L29
2021-09-01 19:26:36 +03:00
Eli Schwartz 2fc7592e13
i18n module: provide targets as return value for gettext()
Users may wish to make use of these files for their own purposes.

For example, the -pot and -update-po pseudo targets could be reused in
an alias_target(), and at least one person wanted to reuse the built .mo
files as custom_target input.

Fixes #6227
2021-08-31 23:37:33 -04:00
Daniel Mensinger a6c9a151d3 interpreter: Make comparisons of different types a hard error 2021-08-31 23:01:21 +02:00
Xavier Claessens e646130ef1 interpreter: Fix dependency(..., static: true) fallback
It should build the fallback subprject with default_library=static and
override the dependency for both static=True and static kwarg not given.

Fixes: #8050.
2021-08-23 10:52:18 -04:00
Tristan Partin be92e37837 Add Java module
The Java module will serve as a source for easing Java development
within Meson. Currently it only supports generating native header files.
2021-08-22 07:57:29 -07:00
Jussi Pakkanen 3d98d54fc5
Merge pull request #9012 from dcbaker/submit/qt-custom-targets
Qt module generated sources
2021-08-20 21:09:49 +03:00
Xavier Claessens 12e5bfbc1c external-project: Add support for WAF build system
Fixes: #7638
2021-08-20 09:12:20 -04:00
Dylan Baker 42d27f05c6 docs: add snippet for qt compile_ method generated inputs 2021-08-18 19:47:10 -07:00
Xavier Claessens 8c5aa031b5 Add install tags
Fixes: #7007.
2021-08-17 15:19:18 -04:00
Dylan Baker 7dda90f1bf interpreter/compiler: remove unittest_args method
It's not documented, and it's been marked deprecated for who knows how
long.
2021-08-16 16:21:51 -07:00
Tristan Partin 1dc13e9951 Add unset_variable()
This should be useful for helping to control variable scope within
Meson. CMake has something similar for controlling scope.
2021-08-16 14:05:13 -04:00
Jussi Pakkanen a90d2925dd Revert "compilers/c++: Add MSVC option to make the __cplusplus define accurate"
This reverts commit 0b97d58548.
2021-08-15 13:18:35 +03:00
Dylan Baker 0b97d58548 compilers/c++: Add MSVC option to make the __cplusplus define accurate
Otherwise it always returns the value for c++98, starting with MSVC 2017
15.7 or later. Earlier versions are not affected by this mis-feature
2021-08-11 21:54:16 +03:00
Jussi Pakkanen f2fe271198 Add support for finding Javascript source libraries with Emscripten. 2021-08-08 15:25:48 +03:00
Xavier Claessens 9da99e7a59 destdir: Allow relative to build directory
Meson already works like that, except in do_copydir() that requires
absolute destdir. Better explicitly support that instead of leaving it
undefined and unconsistent.
2021-08-04 09:43:41 -04:00
Florian Schmaus dbf2ace6ca
coredata: throw a MesonException on unknown options
Fixes #7288.
2021-07-26 01:10:58 +03:00
miebka e665864660 Added release snippet 2021-07-25 09:07:12 -07:00
Jussi Pakkanen 4703f4c244
Merge pull request #8992 from dcbaker/submit/modernize-python-module-dependency
Cleanup the python module
2021-07-22 01:16:24 +03:00
Jussi Pakkanen 116e4d4850 Set up the 0.59.0 release. 2021-07-18 13:39:53 +03:00
Dylan Baker 1f7ab2f010 modules/python: Add type annotations
There's still a number of things that don't properly type check, that's
expected though as the input is often unvalidated and assumed good.
2021-07-13 16:43:14 -07:00