Commit Graph

1704 Commits

Author SHA1 Message Date
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
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 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
Connor Abbott 62702005eb windows: Support wrc resource compiler
It has a similar interface to windres, but it produces ELF instead of
COFF binaries. It uses its own preprocessor which doesn't support
creating depfiles, but we can convince it to use the system preprocessor
instead and pass those arguments using the --preprocessor option.

Together with some hacks to override the shared library/executable
suffix and some wine patches [1] this is enough to compile dxvk when
ripping out the hand-rolled rc support.

[1] https://www.winehq.org/pipermail/wine-devel/2021-July/190100.html
https://www.winehq.org/pipermail/wine-devel/2021-July/190098.html
https://www.winehq.org/pipermail/wine-devel/2021-July/190099.html
https://www.winehq.org/pipermail/wine-devel/2021-July/190101.html
2021-07-07 18:54:45 +03:00
Jussi Pakkanen 50f870e361
Merge pull request #8957 from jon-turney/dependency-doc-improve
Improvements to dependency doc
2021-07-05 02:54:29 +03:00
Jon Turney 746f00e69e Users: Update URL for pacman
git.archlinux.org has been decomissioned [1]

[1] https://lists.archlinux.org/pipermail/arch-dev-public/2021-June/030466.html
2021-07-04 12:05:49 -04:00
Jon Turney 77f0820a8e
Consistently capitialize 'Meson' in Dependencies.md
Consistently capitialize 'Meson' where used as a proper name in
Dependencies.md.
2021-07-04 15:18:16 +01:00
Jon Turney bfafb83069
Improve text for dependency detection methods
Make it clear that search order for 'auto' there only applies to generic
dependency names.  Drop 'system' from that list, as it's not actually
used for generic dependencies (nor is it defined what it would do).
2021-07-03 13:03:12 +01:00
Jussi Pakkanen ee46c0242f Fix image link names. 2021-07-03 14:46:15 +03:00
Dylan Baker bc4201a7f1 interpreter: add required and disabled to import
This is useful both from the perspective of optional functionality that
requires a module, and also as I continue to progress with Meson++,
which will probably not implement all of the modules that Meson itself
does.
2021-06-30 16:28:14 -07:00
Jon Turney 5968a05adb
Alphabetize dependency names with special lookup 2021-06-30 15:16:51 +01:00
Jon Turney e047a1f622
Move 'builtin', 'config-tool' and 'system' methods to discussion of methods 2021-06-30 15:16:03 +01:00
Jussi Pakkanen 6337e40115
Merge pull request #8882 from xclaesse/msubprojects-parallel
msubprojects: Run action on all subprojects in parallel
2021-06-29 21:13:25 +03:00
Simon Ser 1f3adc4dbe Add feed arg to custom_target() 2021-06-29 20:54:13 +03:00
andy5995 81ca0ec7ae Users.md:add rmw 2021-06-29 20:51:04 +03:00
Xavier Claessens 2b6fe00e3d msubprojects: Run action on all subprojects in parallel
This moves all the code into a class and call its run() method in a
thread. The class queues all logs to print them at the end to avoid
mixing output of multiple actions.
2021-06-25 15:16:55 -04:00
Xavier Claessens d3d95d39be gnome: add update_desktop_database to post_install() 2021-06-23 15:48:32 -04:00
Xavier Claessens 39c6571a46 gnome: Set GSETTINGS_SCHEMA_DIR in devenv 2021-06-23 15:48:32 -04:00
fanc999 edfe24178d
Add Visual Studio 2012/2013 backends (#8803)
* backends: Add a Visual Studio 2013 backend

This is more-or-less a quick port from the VS2015 backend, except that
we update the Visual Studio version strings and toolset versions
accordingly.  Also correct the generator string for Visual Studio 2015
in mesonbuild/cmake/common.py.

* backend: Add VS2012 backend

Similar to what we did for Visual Studio 2013, add a Visual Studio 2012
backend.

* vs2010backend.py: Implement `link_whole:` if needed

We actually need Visual Studio 2015 Update 2 to use `/WHOLEARCHIVE:`,
which is what we are currently using for `link_whole:` on Visual Studio.
For Visual Studio versions before that, we need to expand from the
static targets that were indicated by `link_whole:`, and any of the
sub-dependent targets that were pulled in via the dependent target's
`link_whole:`.  This wil ensure `link_whole:` would actually work in
such cases.

* vs2010backend.py: Handle objects from generated sources

Unforunately, we can't use backends.determine_ext_objs() reliably, as
the Visual Studio backends handle this differently.

* vs2010backend.py: Fix generating VS2010 projects

Visual Studio 2010 (at least the Express Edition) does not set the envvar
%VisualStudioVersion% in its command prompt, so fix generating VS2010
projects by taking account into this, so that we can determine the location
of vcvarsall.bat correctly.

* whole archive test: Disable on vs2012/2013 backends too

The Visual Studio 2012/2013 IDE has problems handling the items that would be
generated from this test case, so skip this test when using
--backend=vs[2012|2013].  This test does work for the Ninja backend when
VS2012 or VS2013 is used, though.

Consolidate this error message with XCode along with the vs2010 backend.

* docs: Add the new vs2012 and vs2013 backends

Let people know that we have backends for vs2012 and 2013.  Also let
people know that generating Visual Studio 2010 projects have been fixed
and the pre-vs2015 backends now handle the `link_whole:` project option.
2021-06-22 21:00:23 +03:00
Jussi Pakkanen 7588dbc587
Merge pull request #8900 from bonzini/extract-objects-docs
extract_objects: fixes, tests and documentation for using the result in a custom_target
2021-06-22 20:39:58 +03:00
Dylan Baker a44c1d18c1
Merge pull request #8898 from e820/interpreter-required-arguments
interpreter: Add checked kwarg to compiler.get_supported_arguments
2021-06-22 09:50:24 -07:00
Paolo Bonzini a656febccf extract_objects: test and document using the result in a custom_target
QEMU would like to use the result of extract_objects in a custom_target;
examples are using objcopy, or using the object files as the key to look
up command line arguments in compile_commands.json.  This is slightly
peculiar and not covered by the test suite, but it works; in order to avoid
regressions, add a test case and document it.
2021-06-22 10:40:38 +02:00
Daniel Mensinger 5cd9f88d6c fix: Ensure that build targets have all methods from ExternalProgram
As a side-effect from #8885 `find_program()` returns now `Executable`
objects when `meson.override_find_program` is called with an
executable target. To resolve this conflict the missing methods
from `ExternalProgram` are added to `BuildTarget`.
2021-06-21 20:19:06 +03:00
Laurin-Luis Lehning d5ed8f61a5 interpreter: Move argument checks from add_*_arguments to compiler.get_supported_arguments 2021-06-21 09:15:13 +02:00
Laurin-Luis Lehning 377adfb6fb docs: Fix snippet heading for required project arguments 2021-06-21 09:15:13 +02:00
Laurin-Luis Lehning c9ad98ef5e interprter: Add required kwarg to add_(project|global)_arguments
To avoid manual compiler support checks add_project_arguments and
add_global_arguments receive a new keyword argument to perform
them automatically.
2021-06-21 09:15:13 +02:00
Orta Therox 2e8729a7e6 Update Quick-guide.md 2021-06-19 15:41:54 +03:00
Dylan Baker f7eda0e822 modules/qt: allow string values for include_directories
This should have been supported before, but wasn't.
2021-06-18 09:52:23 -07:00
Xavier Claessens 5f3b73beb5 dependency: Empty fallback is the same as allow_fallback: false 2021-06-18 12:47:41 -04:00
Eli Schwartz d729ea3f69
Revert "Add Chicken-Libraries to Users.md (#8180)"
This reverts commit 72365e6856.

This is a vanity project that no longer exists.

See discussion at #8890, which still requires further thought but we can
at least start off by removing something clearly invalid.
2021-06-17 17:06:53 -04:00
Eli Schwartz 2c6ccfe4c4
intl custom dependency
Checking how to aquire the *gettext family of symbols portably is
annoyingly complex, and may come from the libc, or standalone.

builtin dependency:

    This detects if libintl is unneeded, because the *gettext family of
    symbols is available in the libc.

system dependency:

    This detects if libintl is installed as separate software, linkable via
    -lintl; unfortunately, GNU gettext does not ship pkg-config files for
    it.

Fixes #3929
2021-06-17 13:22:25 -04:00
Jussi Pakkanen 6fb2f86379
Merge pull request #8822 from dcbaker/submit/annotate-and-check-qt-module
Rewrite the Qt module for type safety!
2021-06-16 20:11:46 +03:00
andy5995 537adce5d8 Users.md: add canfigger library 2021-06-15 14:47:52 -07:00
Dylan Baker 0f5e55a749 docs: Add a page for qt6
Which has been missing since the module was added in 0.57.0.
This also uses the include syntax
2021-06-15 14:15:13 -07:00
Dylan Baker 7535736108 docs: Use an include for the qt modules
Insteadf of qt4 referencing the Qt5 page, include the same content in
both.
2021-06-15 14:15:13 -07:00
Dylan Baker cf6e8d6834 docs: update qt module documentation with types and new files 2021-06-15 12:48:52 -07:00
Dylan Baker 4575ed3d31 modules/qt: Deprecated the preprocess sources keyword argument 2021-06-15 12:35:15 -07:00
Dylan Baker f559e56d0a docs/qt: document all of the arguments of the preprocess function 2021-06-15 12:35:15 -07:00
Dylan Baker 0fe3dc6571 modules/qt: Deprecated the *sources variadic argument to preproccess
It's confusing, and it's a duplicate of the `sources` keyword argument,
which has always existed.
2021-06-15 12:35:15 -07:00
Jussi Pakkanen f69962a4f7 Update macOS installation instructions. 2021-06-15 19:45:09 +03:00
Eli Schwartz 1086305715
doc: fix typo preventing correct page generation
This originally worked but was erroneously reported as wrong and thereby
regressed in commit a7357887c7
2021-06-14 19:24:54 -04:00
andy5995 07e6e0ca8c markdown/Dependencies:remove tabs
Remove tabs introduced by https://github.com/mesonbuild/meson/pull/8866
2021-06-10 21:15:41 -04:00
Andy Alt 53e4ca2456 add example for defining curses preprocessor symbols 2021-06-11 01:03:34 +03:00
Xavier Claessens 8255100485
doc: Add direct link to matrix channel (#8859) [skip ci] 2021-06-09 10:15:04 -07:00
Dylan Baker a7357887c7 docs: fix issues with the cython docs 2021-06-08 20:21:48 -07:00
Eli Schwartz ed19eb2443
document the enhancement to the Fs module permitting File arguments
Add a release notes snippet too!
2021-06-08 16:52:48 -04:00
Xavier Claessens f2b678ef68
doc: Fix link to Commands.md 2021-06-08 11:02:56 -04:00
Jussi Pakkanen a4a61b6bf8
Merge pull request #8512 from bonzini/feature-methods
Utility methods for feature objects
2021-06-08 12:37:25 +03:00
Paolo Bonzini a87e32d181 interpreter: add feature.disable_auto_if()
Add a method to downgrade an option to disabled if it is not used.
This is useful to avoid unnecessary search for dependencies;
for example

    dep = dependency('dep', required: get_option('feature').disable_auto_if(not foo))

can be used instead of the more verbose and complex

    if get_option('feature').auto() and not foo then
      dep = dependency('', required: false)
    else
      dep = dependency('dep', required: get_option('feature'))
    endif

or to avoid unnecessary dependency searches:

  dep1 = dependency('dep1', required: get_option('foo'))
  # dep2 is only used together with dep1
  dep2 = dependency('dep2', required: get_option('foo').disable_auto_if(not dep1.found()))
 ```

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-06-08 10:18:12 +02:00
Paolo Bonzini 2f2d99e1d8 interpreter: add feature.require()
Add a method to perform a logical AND on a feature object.  The method
also takes care of raising an error if 'enabled' is ANDed with false.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-06-08 10:18:12 +02:00
Dylan Baker 0cb05004ca docs: Add cython docs 2021-06-07 09:25:32 -07:00
Xavier Claessens 769fd50373 docs: Generate a table of all wrapdb releases
wrapdb CI will trigger Meson's CI to regenerate the list when
releases.json is updated.
2021-06-05 17:01:34 -04:00
Paolo Bonzini 08a8043f19 interpreter: add feature.allowed()
This method simplifies the conversion of Feature objects to booleans.
Often, one has to use the "not" operator in order to treat "auto"
and "enabled" the same way.

"allowed()" also works well in conjunction with the require method that
is introduced in the next patch.  For example,

  if get_option('foo').require(host_machine.system() == 'windows').allowed() then
    src += ['foo.c']
    config.set10('HAVE_FOO', 1)
  endif

can be used instead of

  if host_machine.system() != 'windows'
    if get_option('foo').enabled()
      error('...')
    endif
  endif
  if not get_option('foo').disabled() then
    src += ['foo.c']
    config.set10('HAVE_FOO', 1)
  endif

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-05-31 16:01:57 +02:00
Jussi Pakkanen b9b73b65a7 Update chat info. [skip ci] 2021-05-26 12:39:34 +03:00
Dylan Baker 17eb224aa7 interpreter: Automatically add 'c' to languages when 'vala' is used
This is so dumb, we can just insert C for you without you having to know
that you're using C under the hood. This is nicer because:
1) Meson doesn't make the user add a language they're not explicitly
   using
2) If there was ever an implementaiton of Vala that didn't use C as
   it's assembly language, this wouldn't make any sense.
2021-05-19 23:28:17 +03:00
Tim McNamara a6e9b54b1d doc: Fix array syntax [skip ci]
Adds a square bracket to create a valid array.
2021-05-18 19:12:17 -07:00
Xavier Claessens 69a5c950a3 pkgconfig: Do not escape custom variables
We need to escape space in variables that gets into cflags or libs
because otherwise we cannot split compiler args when paths contains
spaces. But custom variables are unlikely to be path that gets used in
cflags/libs, and escaping them cause regression in GStreamer that use
space as separator in a list variable.
2021-05-18 18:03:37 -04:00
Randy Yates d7cb58e57d add cpu family csky 2021-05-18 23:17:12 +03:00
Jussi Pakkanen 0b2a7300c0 Set up VS environment automatically when run. 2021-05-13 11:03:10 +03:00
Mehmet Ali Baykara 204abd0e85
little punctuation and add a phrase [skip ci]
Add the `second` to improve readability.
2021-05-13 10:56:50 +03:00
Xavier Claessens 44acefd836 doc: Add example how to use devenv
Fixes: #8758
2021-05-12 10:44:13 -04:00
Jussi Pakkanen c54dd63547 Make objective C use C standard version. Closes #5495. 2021-05-11 22:47:17 +03:00
Jussi Pakkanen 1ca8fa31ea Document how to run the wrap valídator. [skip ci] 2021-05-02 14:22:27 +03:00
Jussi Pakkanen 753954be86 Release 0.58.0. 2021-05-02 12:42:42 +03:00
Alexander Lyashuk cdc6c866ca
doc: update syntax description of immutability
"Stored by value" is more correct way to explain that example.

Mutable vs immutable means that you cannot mutate the value (e.g. list vs tuple in Python), and the example shows that `var2` is actually mutable.

Copying/storing a reference vs value is what what matters in the assignment, in Python `a=b` means `a` and `b` are references to the same list, while in meson `a=b` copies the value of `b` into `a`.
2021-04-28 00:39:56 -04:00
Jussi Pakkanen 959aac5a02 Add snippet about Xcode. [skip ci] 2021-04-26 23:39:15 +01:00