Commit Graph

1690 Commits

Author SHA1 Message Date
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
ePirat 6c908a04d7 docs: add note about built-in options support
Older meson versions would not honor the `<lang>_args` and `<lang>_link_args` in the built-in
options section, add a note about this to the relevant section as it can cause quite some surprises
when using a crossfile with an older meson version.
2021-09-10 23:59:30 +03:00
Filipe Laíns af8b55d49b mintro: add installed_plan
Signed-off-by: Filipe Laíns <lains@riseup.net>
2021-09-06 18:10:55 +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
jimman2003 10151d8738
Make assignment a statement in Syntax.md (#9188) [skip-ci]
* Make assignment a statement in Syntax

force to change line 709 to something kind of non sensical

* Applied code review changes
2021-08-31 08:57:03 -07:00
Xavier Claessens 276063a1d2 Add missing "disabler" kwarg to python.dependency()
There is a unit test using it and now fails because the warning about
unknown kwarg became fatal.
2021-08-30 14:00:54 -04:00
Andrea Pappacoda 64ea8dce7a docs: update LD docs link in FAQ.md 2021-08-28 11:25:52 -07:00
Eli Schwartz 16a162d10a
FAQ: document some community work toward implementing Meson in C/C++
This is useful information for solving the OS bootstrapping problem.
Give it some visibility.

Also, I don't want to forget where I found any of these. :D

ref. #2335
2021-08-27 13:20:54 -04: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
Eli Schwartz aad986b4b5
Fix syntax error that broke the website
Regression in commit be92e37837
2021-08-22 12:06: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 e69b9c982c Update instructions on installing with Pip. Closes #9034. 2021-08-21 22:34:40 +03: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
Dylan Baker a7f3703440 modules/qt: Allow using generated sources for compile_translations ts_files 2021-08-18 19:47:07 -07:00
Dylan Baker a16335a958 modules/qt: Allow Generated sources in compile_resources 2021-08-18 19:46:47 -07:00
Dylan Baker ff573620b0 modules/qt: allow passing generated targets to compile_ui 2021-08-18 19:46:47 -07:00
Dylan Baker 965fcf2883 modules/qt: Allow generated sources for arguemnts to compile_moc 2021-08-18 19:46:47 -07:00
Eli Schwartz 44e123dd90
test runner: add the ability to configure test.json for python paths
Adds new installed file types with @VAR@ substitution.
2021-08-18 17:58:30 -04:00
Daniel Mensinger a216de4898 docs: Remove the deleted function find_library 2021-08-18 21:56:45 +03: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
Jussi Pakkanen aa68440ba6 Document new rules for green CI. 2021-08-16 21:38:05 +03: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
Eli Schwartz 59d4f771d2
editorconfig: add setting to trim trailing whitespace
and clean up all outstanding issues

Skip 'test cases/common/141 special characters/meson.build' since it
intentionally uses trailing newlines.
2021-08-15 09:36:18 -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
Xavier Claessens b74db1dda2 Document that custom_target() install_dir can be a list 2021-08-13 08:18:38 -04:00
Eli Schwartz e4c50bf8a7
fix the previous commit which deleted a doc file but not the index entry
The CI still passed, or should I say, didn't run, and I failed to notice
this in manual review. Sorry!
2021-08-12 12:43:34 -04:00
Eli Schwartz bf1ae2c7f9
Update wrap documentation to describe new submission process 2021-08-12 12:18:58 -04: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
David Seifert 46380b5b1e doc: mention CUDA_PATH in dependency('cuda') [skip ci] 2021-07-27 13:21:51 +03: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
Weston Schmidt 2e30b5a1e2 Add support for gcovr --sonarqube report
Sonarcloud.io only can read the sonarqube based report that gcovr can
produce.  This change enables support for this output in meson and
ninja.

Signed-off-by: Weston Schmidt <Weston_Schmidt@alumni.purdue.edu>
2021-07-23 22:15:00 +03:00
Dylan Baker 5583e44826 qt: Allow CustomTargets for qt.preprocess source arguments
This works for `moc_*` and `ui_files`, but it never could have worked
for `qresources` due to the implementation assuming a `str` or `File`.
To restore previous compatibility I've added `CustomTarget` where it
would have worked, but not where it would have failed, the former would
raised an exception along the lines anyway.

Fixes #9007
2021-07-23 00:46:22 +05:30
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
Andrea Pappacoda c8c7c56897 docs: fix minor typos in Machine-files.md 2021-07-08 14:05:17 -04:00
Jon Turney c78e6cac80 Allow `skip_*` test.json keys at top-level or in `matrix:` 2021-07-07 20:08:12 +02:00
Jon Turney a2e44296c9 Add `skip_on_os` to test.json 2021-07-07 20:08:12 +02:00
Jon Turney 7126fbaf81 Add `skip_on_jobname` to test.json
Plan to replace the hard-coded list of 'may be skipped' framework tests in
skippable() with annotations in test.json which record 'will be skipped
in these specific CI jobs'.

If the value of the MESON_CI_JOBNAME env var (an arbitrary string
expected to be unique for each CI configuration) contains any of the
strings in the `skip_on_jobname` key in test.json, the test is expected
to output MESON_SKIP_TEST.

Unexpected skips or runs are treated as an error.

Future work: Maybe we should add additional count categories 'unexpected
skip' and 'unexpected not skipped', rather than counting those as 'skipped'
and 'failed', respectively.
2021-07-07 20:08:12 +02:00