Commit Graph

501 Commits

Author SHA1 Message Date
Xavier Claessens 3c64ecaf86 pkgconfig: Add support for CustomTarget objects in generator
Fixes: #8618.
2021-04-19 17:57:34 +03:00
Tristan Partin 4c13aa30a1 dependency: Add JDK system dependency
The JDK system dependency is important for detecting JDK include paths
that may be useful when developing a JNI interface.
2021-04-12 10:43:11 -07:00
Xavier Claessens 5440ce003b Add global_source/build_root() 2021-04-09 09:29:12 -07:00
Jussi Pakkanen e80ff985fb Do not add custom target dir automatically when implicit false. 2021-03-29 18:57:34 +03:00
Xavier Claessens 1ad469342b msubprojects: wrap-file should be re-extracted with --reset
When using --reset we should guarantee that next reconfigure will pick
the latest code. For wrap-file we have no way to know if the revision
changed, so we have to delete the source tree and extract again.

It is unlikely that user has local changes in non-git subprojects, and
--reset is known to be dangerous.
2021-03-28 23:24:01 +03:00
Jussi Pakkanen 54767ab482
Merge pull request #8568 from dcbaker/submit/qt-dependency-factory
QT: use a proper dependency factory
2021-03-24 22:52:15 +02:00
Dylan Baker c211fea513 Refactor Qt Dependency into proper split classes with factories
Currently the Qt Dependencies still use the old "combined" method for
dependencies with multiple ways to be found. This is problematic as it
means that `get_variable()` and friends don't work, as the dependency
can't implement any of those methods. The correct solution is to make
use of multiple Dependency instances, and a factory to tie them
together. This does that.

To handle QMake, I've leveraged the existing config-tool mechanism,
which allows us to save a good deal of code, and use well tested code
instead of rolling more of our own code.

The one thing this doesn't do, but we probably should, is expose the
macOS ExtraFrameworks directly, instead of forcing them to be found
through QMake. That is a problem for another series, and someone who
cares more about macOS than I do.
2021-03-23 15:28:08 -07:00
Xavier Claessens a9e9b7c750
devenv: Set GI_TYPELIB_PATH and LD_LIBRARY_PATH (#8548) 2021-03-23 23:35:05 +02:00
Xavier Claessens 1be13710ad
environment(): Allow stacking append() and prepend() (#8547)
* environment(): Allow stacking append() and prepend()

* Update docs/markdown/Reference-manual.md

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
2021-03-23 17:48:17 +02:00
Jussi Pakkanen 9ab4dadef9 Remove -pipe from default list of args. Closes #8508. 2021-03-23 17:26:08 +02:00
Xavier Claessens 3990754bf5 Allow add_dist_script() in subprojects
Fixes: #8440.
2021-03-18 08:41:21 -04:00
Xavier Claessens 848e360450 interpreter: Add varname as positional arg in dep.get_variable() 2021-03-18 08:37:44 -04:00
Xavier Claessens 0638e38bfc clangformat: Add clang-format-check target 2021-03-16 21:01:54 -04:00
Xavier Claessens f558689277 clangformat: Add include and ignore files 2021-03-16 21:01:54 -04:00
Xavier Claessens a45f939092 Add range() function
Fixes: #5026.
2021-03-16 20:50:16 -04:00
Xavier Claessens 598e968993 Add `meson devenv` command and meson.add_devenv() 2021-03-16 09:00:50 -04:00
Laurin-Luis Lehning f7dd111333 Some documentation language adjustments & improved error messages 2021-03-10 08:55:22 -05:00
Laurin-Luis Lehning e124afa409 Fix release snippet still using the old fstring syntax 2021-03-10 08:55:22 -05:00
Laurin-Luis Lehning 2607510b18 Add failing test cases & release snippet 2021-03-10 08:55:22 -05:00
Jussi Pakkanen d76345b4be Add address sanitizer support for Visual Studio. 2021-03-09 13:52:15 -08:00
Tristan Partin c83106ee38 Add str.replace() method 2021-03-09 06:27:58 -05:00
Jason Woodward 50af09de03 install_man locale support
Rather than having to manually build the locale aware man paths with

`install_data('foo.fr.1', install_dir: join_paths(get_option('mandir'), 'fr', 'man1'), rename: 'foo.1')`

Support doing

`install_man('foo.fr.1', locale: 'fr')`
2021-02-27 14:35:23 +02:00
Stephen Gregoratto ec5fe58e6d Allow printing UserOptions in the summary 2021-02-26 10:28:00 -05:00
Tim-Philipp Müller ace22f21a7 meson: add .has_external_property() methods
Useful in case of boolean values to distinguish between a boolean
value having been set in the native/cross file and not having been
provided, which can't be achieved by passing a fallback parameter
to .get_external_property().
2021-02-26 10:15:17 -05:00
Dylan Baker aa4efc709e deprecated `meson.get_cross_property`
It's a pure subset of `get_external_property`, and has odd behavior in
host == build configurations. `get_external_property` is clear, and uses
the standard `native : bool` syntax to control host vs build properties
2021-02-25 15:18:39 -08:00
Xavier Claessens cef5cab23c Support multiple args in error()
Seems it got forgotten when that was added to warnings() and message().

Fixes: #8414.
2021-02-25 22:58:45 +02:00
Matthias Klumpp 4e5efd3897
Allow custom target output to be processed by generators 2021-02-25 20:53:41 +02:00
Xavier Claessens 2fabd4c7dc minstall: Add --skip-subprojects option
By default all subprojects are installed. If --skip-subprojects is given
with no value only the main project is installed. If --skip-subprojects
is given with a value, it should be a coma separated list of subprojects
to skip and all others will be installed.

Fixes: #2550.
2021-02-22 23:03:55 +02:00
Jussi Pakkanen 5d651e76b5 Set up release 0.57. 2021-02-14 21:28:44 +02:00
Luca Weiss 398df56298 Add Qt6 module 2021-02-07 22:43:00 +02:00
Jussi Pakkanen a855bcab1c
Merge pull request #8162 from dcbaker/wip/2021-01/rust-module-bindgen
Add a wrapper to the rust module for bindgen
2021-02-07 16:57:39 +00:00
Jussi Pakkanen 8b82ffa9e4
Merge pull request #8305 from xclaesse/run-target-env
run_target: Add env kwarg
2021-02-07 11:46:41 +00:00
Dylan Baker b28235428d rust: Add a module wrapper for bindgen
This has a couple of advantages over rolling it by hand:
1. it correctly handles include_directories objects, which is always
   handy
2. it correctly generates a depfile for you, which makes it more
   reliable
3. it requires less typing
2021-02-06 10:27:04 -08:00
Dylan Baker 456844a4f3 vala: Disable unity builds
Our approach to unity builds with vala is broken, you cannot unify the
generated C files, as they contain duplicate symbols. We would need to
instead combine the files while they are still in their vala form, then
convert that to C and compile the unified C file.

This does not fix the linked issue, as this removed the ability to do
vala unity builds, but it does allow running vala with `--unity=on`.

Related: #5280
2021-02-05 16:31:33 -08:00
Xavier Claessens 522392e755 run_target: Add env kwarg
Re-implement it in backend using the same code path as for
custom_target(). This for example handle setting PATH on Windows when
command is an executable.
2021-02-05 17:53:09 -05:00
Xavier Claessens b5100fe86a gnome: Add post_install() method
Various GNOME projects have scripts that does similar task, better do it
directly in meson. This ensures it's done correctly regarding usage of
subprojects and pkg-config. See for example this gtk bug:
https://gitlab.gnome.org/GNOME/gtk/-/issues/3626.

Fixes: #8268
2021-02-05 15:08:47 -05:00
Luke Drummond 46e3480f7c Introduce `fs.read` to read a file as a string
Following #7890, this patch introduces the ability to read the contents
of a file to the fs module.

This patch introduces the ability to read files at configure time, but
has some restrictions:
    - binary files are not supported (I don't think this will prove a
    problem, and if people are wanting to do something with binary
    files, they should probably be shelling out to their own script).
    - Only files outside the build directory allowed. This limitation
      should prevent build loops.
Given that reading an arbitrary file at configure time can affect the
configuration in almost arbitrary ways, meson should force a reconfigure
when the given file changes. This is non-configurable, but this can
easily be changed with a future keyword argument.
2021-02-04 17:34:11 +00:00
Xavier Claessens 95c0790711 minstall: Add --dry-run option
Closes: #1281
2021-02-04 16:24:38 +00:00
Luca Weiss 673aff3595 Fix some typos in the release notes snippets 2021-02-03 11:15:14 -08:00
Dylan Baker 6f532b72c8 Add support for LLVM's thinLTO
This uses a separate option, b_lto_mode. It works in conjunction with
b_lto_threads.

Fixes #7493
2021-02-02 12:42:48 -08:00
Dylan Baker bffc94b08f compilers: Add support for using multiple threads with lto
Both Clang and GCC support using multiple threads for preforming link
time optimizaions, and they can now be configured using the
`-Db_lto_threads` option.

Fixes #7820
2021-02-02 12:42:48 -08:00
Jussi Pakkanen 474f4813c4 Capitalize "Meson" consistently as it is a proper name. [skip ci] 2021-01-31 19:49:20 +00:00
Paolo Bonzini 4bde7f31ae copy editing for 0.57 release notes [skip ci] 2021-01-31 15:11:30 +00:00
Xavier Claessens 6c6b5d77d6 add_install_script: add skip_if_destdir kwarg
It is common, at least in GNOME projects, to have scripts that must be
run only in the final destination, to update system icon cache, etc.
Skipping them from Meson ensures we can properly log that they have not
been run instead of relying on such scripts to to it (they don't
always).
2021-01-30 21:28:21 +00:00
Jussi Pakkanen c67e0a8a67
Merge pull request #8264 from xclaesse/ep-misc
external_project: misc improvements
2021-01-30 11:30:16 +00:00
Jussi Pakkanen f0fbb31ccf
Merge pull request #8200 from bonzini/mtest-asyncio-logs
mtest: improvements to logging
2021-01-30 09:52:43 +00:00
Xavier Claessens ef7dfa97fc external_project: Add release snippet 2021-01-29 19:02:48 -05:00
Jussi Pakkanen 3f0a0c1582 Can read project version from a file. 2021-01-29 16:42:59 +00:00
Dylan Baker f808c955ea intepreter: Allow using file objects for the script_name of add_*_script
It's a bit silly and conveluted to have to call find_program on the
output of configure_file, so let's just allow passing files as the
script name.
2021-01-27 21:59:55 +00:00
Xavier Claessens 633264984b custom_target: Add env kwarg 2021-01-27 09:00:54 -05:00