summaryrefslogtreecommitdiff
path: root/mesonbuild/modules
Commit message (Collapse)AuthorAgeFilesLines
* use real pathlib moduleDylan Baker2020-11-204-4/+4
| | | | | We added the _pathlib module to work around defeciencies in python 3.5's implementation, since we now rely on 3.6 lets drop this
* Merge pull request #7894 from obilaniu/cudaupdatesJussi Pakkanen2020-11-181-41/+105
|\ | | | | Update unstable CUDA Module to support newest toolkits and drivers.
| * Update CUDA module's nvcc_arch_flags() and nvcc_arch_readable() for newOlexa Bilaniuk2020-11-051-35/+96
| | | | | | | | | | | | CUDA Toolkits. Also harden internal logic and add several asserts in the testcase.
| * Add newer CUDA Toolkit version entries.Olexa Bilaniuk2020-11-051-6/+9
| | | | | | | | | | | | | | Also, remove the possibility of passing in a compiler instance to min_driver_version. This is because the NVCC compiler instance is, as of CUDA Toolkit 11.0, no longer guaranteed to be versioned identically to the toolkit itself.
* | Merge pull request #7900 from bonzini/stabilize-hashJussi Pakkanen2020-11-181-2/+2
|\ \ | | | | | | Avoid build.ninja changes due to order of hash table iteration
| * | stabilize sets that are converted to listsPaolo Bonzini2020-11-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The order of elements in sets cannot be relied upon, because the hash values are randomized by Python. Whenever sets are converted to lists we need to keep their order stable, or random changes in the command line cause ninja to rebuild a lot of files unnecessarily. To stabilize them, use either sort or OrderedSet. Sorting is not always applicable, but it can be faster because it's done in C and it can produce slightly nicer output.
* | | gnome: Drop use of volatile in GLib type functionsPhilip Withnall2020-11-171-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://gitlab.gnome.org/GNOME/glib/-/issues/600 `volatile` was previously mistakenly used in GLib to indicate that a variable was accessed atomically or otherwise multi-threaded. It’s not meant for that, and up to date compilers (like gcc-11) will rightly warn about it. Drop the `volatile` qualifiers. Based on a patch by Jeff Law. See also http://isvolatileusefulwiththreads.in/c/. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* | gnome: Handle libraries that are not in the current build dirSam Thursfield2020-11-131-5/+6
|/ | | | | | The generate_gir() function previously assumed all library inputs were in the current build dir. This would fail if they weren't.
* pkgconfig: Make external deps of static library publicXavier Claessens2020-11-041-3/+6
| | | | | | | | | | | | | This fix a regression caused by https://github.com/mesonbuild/meson/pull/7837, it wanted to make InternalDependency's external_deps private but has side effect of making StatisLibrary's external_deps private too. It is technically correct to make them private, but Meson used to make StaticLibrary deps public so they are usable without `pkg-config --static` when we know there is only a static library available. Fixes: #7929.
* qt module: fix error message typo, translation qresource accepts qm not tsEli Schwartz2020-11-041-1/+1
| | | | Fixes #7925
* gnome: Tweak error messageSam Thursfield2020-11-011-1/+2
| | | | | | | | | | | | | | | | | It's an easy mistake to do this: gir1 = gnome.generate_gir(...) gir2 = gnome.generate_gir(... includes: ['GObject-2.0', gir1]) This fails with an error: ERROR: Gir includes must be str, GirTarget, or list of them. The issue is that the 'gir1[0]' should be passed instead of 'gir1'. To make the problem slightly clearly, tweak the error message to be: ERROR: Gir includes must be str, GirTarget, or list of them. Got TypelibTarget.
* pkgconfig: Define libdir and includedir in -uninstalled.pc filesXavier Claessens2020-10-221-6/+5
| | | | | | | | | | This fixes glib-2.0-uninstalled.pc file. GLib does `extra_cflags : ['-I${libdir}/glib-2.0/include']` because some of its headers gets installed there. But when used uninstalled that path makes no sense and pkg-config aborts because ${libdir} is not defined. This cannot be worked around by GLib because Meson does not allow setting different `extra_cflags` for -uninstalled.pc, and does not allow setting libdir in `uninstalled_variables`.
* Fix gnome.compile_resources() when glib is a subprojectXavier Claessens2020-10-171-33/+38
| | | | | | | | When glib is a subproject we should use glib-compile-resources it overrides using find_program() in the case it is not installed on the build machine. With old glib version we have to run glib-compile-resources at configure time to generate the list of dependencies, but not when glib is recent enough.
* pkgconfig: InternalDependency's ext_deps should be private by defaultXavier Claessens2020-10-171-1/+1
| | | | | | | | This fixes a regression introduced by https://github.com/mesonbuild/meson/pull/7488. InternalDependency's ext_deps previously where simply ignored, but that PR has effect to add many more public Requires in generated pc files.
* Fix consistency in variables kwargXavier Claessens2020-10-161-19/+7
| | | | | Share common code to extract the `variables` kwarg in declare_dependency() and pkg.generate().
* windows: Avoid target name clash happening in GTK+Xavier Claessens2020-10-151-1/+3
|
* gnome: generate cpp gresource source in cpp projectsmimi899992020-10-151-2/+8
| | | | Closes #7839
* include_type: Add CMake subporject dependency method (fixes #6879)Daniel Mensinger2020-10-131-3/+10
|
* python.dependency() is not respecting 'required' kwargXavier Claessens2020-10-061-2/+9
|
* pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger2020-10-044-4/+4
|
* windows: reduce chance of going over path limit in backend/vsPeter Harris2020-09-281-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building with vs2019 (not ninja), a path length error will be thrown if the path to a resource file is even remotely deep within the tree. This is largely because the target name includes the string "Windows resource for file 'full path'", which is then expanded twice (once for the .vcxproj itself, and once for IntDir) and added to the full path. When combined with the tiny path limits on Windows, it is easy to exceed path limits. This error is largely avoided by the ninja back-end. Unlike the vs back-end, the ninja back-end does not use target.get_id() as part of the project file path, nor does it use target.get_id() as part of get_target_private_dir(). Example error: error MSB4184: The expression "[MSBuild]::NormalizePath( C:\src\mesonbuild\Misc\FreeRDP-master\client\X11\xfreerdp\xfreerdp, f3f7317@@Windows resource for file 'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus\, f3f7317@@Windows resource for file 'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus. vcxproj.CopyComplete)" cannot be evaluated. Path: C:\src\mesonbuild\Misc\FreeRDP-master\client\X11\xfreerdp\xfreerdp\f3f7317 @@Windows resource for file 'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus\f3f7317 @@Windows resource for file 'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus. vcxproj.CopyComplete exceeds the OS max path limit. The fully qualified file name must be less than 260 characters.
* pylint: turn on bad-indentation errorDylan Baker2020-09-221-23/+23
| | | | and fix all of the bad indentation
* Revert "windows: reduce chance of going over path limit in backend/vs"Nirbheek Chauhan2020-09-171-5/+4
| | | | This reverts commit 807f88739ebfa002c9a0b9acd3e24c9610fb02a2.
* windows: reduce chance of going over path limit in backend/vsPeter Harris2020-09-171-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building with vs2019 (not ninja), a path length error will be thrown if the path to a resource file is even remotely deep within the tree. This is largely because the target name includes the string "Windows resource for file 'full path'", which is then expanded twice (once for the .vcxproj itself, and once for IntDir) and added to the full path. When combined with the tiny path limits on Windows, it is easy to exceed path limits. This error is largely avoided by the ninja back-end. Unlike the vs back-end, the ninja back-end does not use target.get_id() as part of the project file path, nor does it use target.get_id() as part of get_target_private_dir(). Example error: error MSB4184: The expression "[MSBuild]::NormalizePath( C:\src\mesonbuild\Misc\FreeRDP-master\client\X11\xfreerdp\xfreerdp, f3f7317@@Windows resource for file 'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus\, f3f7317@@Windows resource for file 'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus. vcxproj.CopyComplete)" cannot be evaluated. Path: C:\src\mesonbuild\Misc\FreeRDP-master\client\X11\xfreerdp\xfreerdp\f3f7317 @@Windows resource for file 'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus\f3f7317 @@Windows resource for file 'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus. vcxproj.CopyComplete exceeds the OS max path limit. The fully qualified file name must be less than 260 characters.
* external-project: Add typing annotationXavier Claessens2020-09-131-7/+20
|
* external-project: New module to build configure/make projectsXavier Claessens2020-09-131-0/+253
| | | | | | | This adds an experimental meson module to build projects with other build systems. Closes: #4316
* typing: more fixesDaniel Mensinger2020-09-081-4/+8
|
* typing: fully annotate fs moduleDaniel Mensinger2020-09-081-4/+4
|
* qt module: add qresource support to compile_translationsEli Schwartz2020-08-251-11/+49
| | | | | | | | | | | | 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.
* cmake: Make the CMake targte not found error more useful (see #7567)Daniel Mensinger2020-08-091-1/+3
|
* pkgconfig: Fix various corner casesXavier Claessens2020-07-301-19/+72
| | | | See unit tests for the exact scenarios this PR fixes.
* Stabilize keyval moduleMarc-André Lureau2020-07-191-0/+0
| | | | | | | | | We have experimented with the module for about a year in a qemu branch (https://wiki.qemu.org/Features/Meson), and we would like to start moving the build system to meson. For that, keyval should have the stability guarantees. Cc: Paolo Bonzini <pbonzini@redhat.com>
* qt module: rcc supports depfiles now, given a recent enough version of Qt5Eli Schwartz2020-07-133-7/+10
| | | | | | | | | Add depfile support to generated targets for Qt >= 5.14. Move warning into the module init itself, to check if the version is too old before issuing. Also tweak the wording itself, to advise upgrading to a suitable version of Qt5 instead of advising to wait for a Qt bug to be fixed.
* Don't make unactionable warnings fatalNirbheek Chauhan2020-07-053-3/+3
| | | | | | | | | | | Some warnings are out of the user's control, such as the RCC QT bug, or the GNU windres bug, or our informational warning about auto-disabling of options when -Db_bitcode is enabled. Such warnings should not be fatal when --fatal-meson-warnings is passed because there's no action that the user can take to fix it. The only purpose it serves is to prevent people who use those features from using --fatal-meson-warnings.
* qt: Fix has_tools() when required=FalseXavier Claessens2020-07-041-36/+15
| | | | | Improve logs by making it clear when the program is found but has wrong version.
* Merge pull request #7231 from mensinda/cmOverrideJussi Pakkanen2020-07-011-9/+101
|\ | | | | cmake: Add more advanced subproject configuration options
| * cmake: Add more advanced subproject configuration optionsDaniel Mensinger2020-06-051-9/+101
| | | | | | | | | | | | | | This is done with the new cmake subprojects options object that is similar to the already exisiting configuration data object. It is consumed by the new `options` kwarg of the cmake.subproject function.
* | pkgconfig: Add missing cflags in uninstalled filesXavier Claessens2020-06-241-16/+11
| | | | | | | | Fixes: #7365
* | Update mesonbuild/modules/gnome.pyXavier Claessens2020-06-161-1/+1
| | | | | | Co-authored-by: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
* | Update mesonbuild/modules/gnome.pyXavier Claessens2020-06-161-1/+1
| | | | | | Co-authored-by: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
* | gnome: Add fatal_warnings kwarg to generate_gir()Xavier Claessens2020-06-161-2/+11
| | | | | | | | Fixes: #7130
* | modules/cmake: Fix setting install_dirDylan Baker2020-06-121-2/+1
|/ | | | Fixes: #7301
* Fix lack of space after 'Cflags:' in pkgconfig filesSoapux2020-05-271-1/+1
|
* Merge pull request #7123 from dcbaker/use-feature-deprecatedJussi Pakkanen2020-05-222-11/+6
|\ | | | | Use FeatureDeprecated (and other cleanups)
| * use FeatureNew.single_useDylan Baker2020-05-141-3/+3
| | | | | | | | This is just slightly cleaner looking
| * modules/pkgconfig: Remove duplicate FeatureNewDylan Baker2020-05-141-2/+0
| |
| * interpreter: Replace some uses of mlog.deprecation with FeatureDeprecatedDylan Baker2020-05-141-6/+3
| | | | | | | | | | | | This gives the version that the feature was deprecated in, and doesn't print the warning if the project supports versions of meson in which the project wasn't deprecated.
* | ninjabackend: Treat GNOME gir/typelib as librariesNirbheek Chauhan2020-05-151-0/+11
|/ | | | | | | | | When classifying generated sources, we were treating gir/typelib files generated by gobject-introspection as headers. This is bad because it serializes the build by adding order-only dependencies to every target even though sources will never actually use them for anything. Treat them as libraries, which is somewhat more accurate.
* gnome.generate_gir: Fix missing include directoriesXavier Claessens2020-05-141-6/+4
| | | | | | This revert a part of #7020 because it was using gir_inc_dirs before it is set. Properly fix typelib_includes instead that was working only when g-i is a pkgconfig dependency.
* python: install_sources() should default to pure, following the docMarc-André Lureau2020-05-101-1/+1
| | | | | | | | | | As stated by the doc, default to install python sources to purelib location, as they should not depend on platform. This also fixes discrepancy between get_install_dir() and install_sources() locations. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>