aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies
AgeCommit message (Collapse)AuthorFilesLines
2021-02-07Add Qt6 moduleLuca Weiss2-1/+13
2021-02-06add loongarch supportXiaotian Wu1-1/+1
2021-01-21interpreter: accept external programs and dependencies for summaryPaolo Bonzini1-0/+17
2021-01-13Fix misspellsAntonin Décimo3-3/+3
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2021-01-12dependencies: use env.machines for is_$os methodsDylan Baker1-7/+7
Currently we use the mesonlib ones, but these are always the build machine definitions, rather than being available for either the build or host machine. We already have an `Environment` instance, and the correct `MachineChoice`, so lets use that. Fixes #8165
2021-01-11boost: default machine file properties to env var valuesDylan Baker1-50/+15
This both moves the env reading to configuration time, which is useful, and also simplifies the implementation of the boost dependency. The simplification comes from being able to delete basically duplicated code since the values will be in the Properties if they exist at all.
2021-01-11dependencies: Don't read PKG_CONFIG_PATH from the env againDylan Baker1-10/+2
We already read this in, don't read it again. Just rely on the value we have stored.
2021-01-11dependencies/mpi: Add a type annotationDylan Baker1-1/+1
Some change in this series causes mypy to notice that this isn't annotated, and it makes a wrong assumption.
2021-01-11import MachineChoice from mesonlibDylan Baker1-1/+1
there are a couple of places importing it from envconfig, which is not correct. It's defined in mesonlib, and then imported into envconfig.
2021-01-10cmake: add PATH logic to preliminary dep check (fixes #8133)Daniel Mensinger1-2/+16
2021-01-04Use a single coredata dictionary for optionsDylan Baker3-11/+11
This patches takes the options work to it's logical conclusion: A single flat dictionary of OptionKey: UserOptions. This allows us to simplify a large number of cases, as we don't need to check if an option is in this dict or that one (or any of 5 or 6, actually).
2021-01-04use OptionKey for builtin and base optionsDylan Baker3-9/+10
I would have prefered to do these seperatately, but they are combined in some cases, so it was much easier to convert them together. this eliminates the builtins_per_machine dict, as it's duplicated with the OptionKey's machine parameter.
2020-12-16cmake: Revert to using self.for_machine instead of MachineChoice.BUILD ↵Daniel Mensinger1-2/+3
(fixes #8028)
2020-11-24compiler: allow non-built internal dependencies as argumentsPaolo Bonzini1-3/+10
Allow methods on the compiler object to receive internal dependencies, as long as they only specify compiler/linker arguments or other dependencies that satisfy the same requirements. This is useful if you're using internal dependencies to add special "-D" flags such as -DNCURSES_WIDECHAR, -D_XOPEN_SOURCE_EXTENDED or -DGLIB_STATIC_COMPILATION.
2020-11-22Merge pull request #8011 from dcbaker/submit/post-python36-cleanupsJussi Pakkanen6-6/+6
Python 3.6 cleanups
2020-11-21Handle cmake dependencies which require a specified versionJason Ekstrand2-3/+11
Some CMake packages fail to find at all if no version is specified. This commit adds a cmake_version parameter to dependency() to allow you to specify the requested version.
2020-11-20use real pathlib moduleDylan Baker6-6/+6
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
2020-11-12dependencies: Put pkgconfig options before operandsHaelwenn (lanodan) Monnier1-1/+5
This fixes building with meson when the POSIX behavior of getopt is used, such as when GNU libc is used with POSIXLY_CORRECT=1 defined
2020-10-30qt: dependency: Strip tool versions from newlinesLaurent Pinchart1-1/+1
When finding the Qt compilation tools (moc, uic, rcc, lrelease), the version strings contain a trailing newline character. This results in a stray newline in the meson log: Detecting Qt5 tools Program /usr/lib64/qt5/bin/moc found: YES 5.14.2 (/usr/lib64/qt5/bin/moc) Program /usr/lib64/qt5/bin/uic found: YES 5.14.2 (/usr/lib64/qt5/bin/uic) Program /usr/lib64/qt5/bin/rcc found: YES 5.14.2 (/usr/lib64/qt5/bin/rcc) Program /usr/lib64/qt5/bin/lrelease found: YES 5.14.2 (/usr/lib64/qt5/bin/lrelease) Strip the version to avoid this, resulting in a cleaner log: Detecting Qt5 tools Program /usr/lib64/qt5/bin/moc found: YES 5.14.2 (/usr/lib64/qt5/bin/moc) Program /usr/lib64/qt5/bin/uic found: YES 5.14.2 (/usr/lib64/qt5/bin/uic) Program /usr/lib64/qt5/bin/rcc found: YES 5.14.2 (/usr/lib64/qt5/bin/rcc) Program /usr/lib64/qt5/bin/lrelease found: YES 5.14.2 (/usr/lib64/qt5/bin/lrelease) Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-22depenencies/llvm: Handle llvm-config --shared-mode failing (#7379)Dylan Baker1-1/+7
* depenencies/llvm: Handle llvm-config --shared-mode failing Fixes: #7371 Fixes: #7878 * test cases/llvm: Refactor to use test.json Instead of trying to cover everything internally
2020-10-16cmake: ignore CMAKE_TOOLCHAIN_FILE and CMAKE_PROJECT_INCLUDE to avoid ↵Daniel Mensinger1-1/+2
conflicts with the meson CMake logic
2020-10-13cmake: Add cross compilation supportDaniel Mensinger1-9/+21
2020-10-13cuda: Also read CUDART_VERSION from cuda_runtime_api.hDaniel Mensinger1-2/+25
2020-10-08dependency: support boolean argument "allow_fallback"Paolo Bonzini1-2/+4
Sometimes, distros want to configure a project so that it does not use any bundled library. In this case, meson.build might want to do something like this, where slirp is a combo option with values auto/system/internal: slirp = dependency('', required: false) if get_option('slirp') != 'internal' slirp = dependency('slirp', required: get_option('slirp') == 'system') endif if not slirp.found() slirp = subproject('libslirp', ...) .variable('...') endif and we cannot use "fallback" because the "system" value should never look for a subproject. This worked until 0.54.x, but in 0.55.x this breaks because of the automatic subproject search. Note that the desired effect here is backwards compared to the policy of doing an automatic search on "required: true"; we only want to do the search if "required" is false! It would be possible to look for the dependency with `required: false` and issue the error manually, but it's ugly and it may produce an error message that looks "different" from Meson's. Instead, with this change it is possible to achieve this effect in an even simpler way: slirp = dependency('slirp', required: get_option('slirp') != 'auto', allow_fallback: get_option('slirp') == 'system' ? false : ['slirp', 'libslirp_dep']) The patch also adds support for "allow_fallback: true", which is simple and enables automatic fallback to a wrap even for non-required dependencies.
2020-10-08interpreter: clean up handling of force_fallbackPaolo Bonzini1-1/+1
Force_fallback is not an interpreter keyword argument, and there is no reason to handle it as one since it is not used anywhere else (and in fact is explicitly ignored by get_dep_identifier). Use a Python keyword argument instead, which makes the code simpler.
2020-10-04pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger5-5/+5
2020-10-04cmake: switch to pathlib (fixes #7322)Daniel Mensinger1-4/+4
2020-09-29dependencies/curses: don't try ncurses-config or system dependency on windowsDylan Baker1-5/+9
with msys ncurses-config returns a unix style path (currently, though it's been fixed upstream), which the compilers don't understand, so we can't do that. Additionally, while the system search does work, there's missing include directories that need to be added.
2020-09-29dependencies/curses: Add support for pdcursesYonggang Luo1-1/+6
On win32 there is pdcurses, so we detect it first, because python depends on ncursesw, so if we don't want to use ncursesw, we should make sure pdcurses detect before ncursesw
2020-09-29dependencies/curses: Add a system dependencyDylan Baker1-1/+58
That calls find_library and has_header in conjunction to look for curses implementations that are baked into the system without any other find method.
2020-09-29dependencies/zlib: Fix header detectionDylan Baker1-1/+1
has_header returns a tuple of (found: bool, cached: bool), so `if has_header` will always return true because the tuple is non-empty. We need to check if the found value is true or not.
2020-09-29dependencies/curses: Add support for using the ncurses config toolsDylan Baker1-1/+20
These are mostly duplicated with pkg-config, but maybe someone has one but not another, and they're easy to turn on with the ConfigToolDependency.
2020-09-29dependency/misc: change lookup order for curses pkg-configDylan Baker1-1/+1
look for (in order): ncursesw, ncurses, curses.
2020-09-29dependencies/misc: Fix typing of curses_factoryDylan Baker1-3/+3
2020-09-29Merge pull request #7758 from dcbaker/submit/hdf5-factoryDylan Baker3-110/+151
dependencies/hdf5: Convert to a dependency_factory
2020-09-28typing: fully annotate cmake.executorDaniel Mensinger1-5/+5
2020-09-25dependencies/hdf5: Use the correct compilers for the machineDylan Baker1-5/+19
Instead of the default ones, this is especially important when cross compiling or when using compilers that aren't compatible with the default ones. squash! dependencies/hdf5: Use the actual system compilers
2020-09-25dependencies/hdf5: Convert to a dependency_factoryDylan Baker3-109/+136
Instead of a mega dependency that does everything, use a dependency factory for config-tool and pkg-config
2020-09-22pylint: Turn on warnings for incorrect number of argsDylan Baker1-4/+4
This catches some very real errors. The one in scalapack is pretty silly actually, it's failing to figure out that the exploded list is at least two arguments. However, the code is actually clearer by not using a list and exploding it, so I've done that and pylint is happy too.
2020-09-14InternalDependency: Add as_link_whole() methodXavier Claessens1-0/+5
2020-09-13external-project: New module to build configure/make projectsXavier Claessens1-11/+18
This adds an experimental meson module to build projects with other build systems. Closes: #4316
2020-09-08typing: fix code reviewDaniel Mensinger1-4/+4
2020-09-08typing: more fixesDaniel Mensinger1-1/+3
2020-09-08typing: fix dependencies for new follow_importsDaniel Mensinger3-14/+17
2020-09-08typing: ignore error because of untyped decoratorDaniel Mensinger1-1/+1
2020-09-08typing: fully annotate boost and hdf5 depsDaniel Mensinger2-8/+12
2020-09-08Add some type hints to the ExternalProgram classNirbheek Chauhan1-7/+7
2020-09-08Fix picking up tools with args from the env on WindowsNirbheek Chauhan1-1/+8
This was a regression in https://github.com/mesonbuild/meson/pull/7059. We do not need to do a full search for all windows special cases. We only want to check whether the command provided is actually a full path to a script so we can add the interpreter. Fixes https://github.com/mesonbuild/meson/issues/7645
2020-09-02cmake: Don't link DEBUG to CRT when not building with MSVCNirbheek Chauhan1-1/+3
is_debug doesn't just control the CRT, it also controls the 'debug configuration' which is unrelated to the CRT setting on non-MSVC. Fixes https://github.com/mesonbuild/meson/issues/7631
2020-09-02dependencies/mpi: add missing annotationDylan Baker1-3/+3