aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-03-11coredata: Set default options as cmdline args that override each otherNirbheek Chauhan3-9/+32
The previous code was assuming that options do not depend on each other, and that you can set defaults using `dict.setdefault()`. This is not true for `buildtype` + `optimization`/`debug`, so we add defaults + overrides in the right order and use the options parsing code later to compute the values. Includes a test. Closes https://github.com/mesonbuild/meson/issues/6752
2020-03-11coredata: Convert all option parsing to OrderedDict()Nirbheek Chauhan1-5/+5
This ensures that options are always parsed in the order in which they were specified on the command-line, even with Python 3.5, and non-CPython implementations compatible with CPython 3.5 and 3.6. Closes https://github.com/mesonbuild/meson/issues/6742
2020-03-10Improve regular expression for MSVC compiler target arch detectionLuca Bacci1-1/+1
Did not work for some MSVC output language combinations. Now should work for every locale / output language. Fixes issue #6757
2020-03-09Document the requirement to run tests before coverage [skip ci]Vedran Miletić2-1/+16
Co-authored-by: Vedran Miletić <vedran@miletic.net>
2020-03-09Add OpenTitan to the list of users. [skip ci]Jussi Pakkanen1-0/+1
2020-03-09pkgconfig: Document conflicts keywordFini Jastrow2-1/+2
[why] Sometimes one want to set the 'Conflicts:' field in .pc files. This is possible by using the 'conflicts' keyword argument in the pkgconfig module. The feature is not documented on mesonbuild.org, though. But a warning is issued: WARNING: Passed invalid keyword argument "conflicts". WARNING: This will become a hard error in the future. History: It has been added along with kwarg 'url' with commit 309041918 pkgconfig: Add missing 'URL' and 'Conflicts' entries Later the kwargs check has been introduced with 80d665e8d Converted some modules. but both 'url' and 'conflicts' were missing. With commit 2acf737b pkgconfig: Document url keyword the 'url' kwarg has been added to the checks, but not 'conflicts'. [how] Add 'conflicts' to the allowed kwargs. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2020-03-09Merge pull request #6532 from jon-turney/languages-native-kwargJussi Pakkanen12-18/+103
Add add_languages(native:)
2020-03-09Fix introspection of symlink targets on macOS.Jussi Pakkanen1-13/+33
2020-03-08Merge pull request #6736 from dcbaker/mesonlib-type-annotationsJussi Pakkanen20-325/+355
Mesonlib type annotations
2020-03-08cmake: Fix build_by_default: false, install: true (fixes #6737)Daniel Mensinger3-3/+7
2020-03-08Merge pull request #6688 from dcbaker/emcc-linker-bugsJussi Pakkanen15-32/+157
Emcc linker bugs and improvments
2020-03-08update test_templatesMichael1-0/+5
2020-03-08add logic for Java jar projectMichael1-7/+29
2020-03-08update test_templates to add dlang and find rustMichael1-1/+7
2020-03-08intro: List symlinks in installdata (fixes #6734)Daniel Mensinger2-3/+34
2020-03-08qt5: Add has_tools() methodXavier Claessens4-1/+53
2020-03-07Merge pull request #6203 from xclaesse/override-dependencyJussi Pakkanen15-43/+276
Add meson.override_dependency()
2020-03-07add setup keyword in example commands [skip ci]Michael Brockus1-2/+2
2020-03-06dependency: Verify fallback variable consistencyXavier Claessens7-5/+41
This change made `5 dependency versions` unit test fail because now once a subproject has been configured, the fallback variable is checked to be consistent. So it has to use new subproject because 'somesub' was already configured by previous tests.
2020-03-06override_dependency: Add failure testsXavier Claessens1-0/+11
2020-03-06Improve logged messages for overriden dependenciesXavier Claessens3-12/+27
2020-03-06Allow override_dependency() with a not-found depXavier Claessens3-0/+12
2020-03-06Simplify dependency() fallbackXavier Claessens6-15/+50
Now that subprojects can override the dependency name, there is no need to provide a variable name for the fallback any more.
2020-03-06Add meson.override_dependency()Xavier Claessens9-27/+151
Similar to meson.override_find_program() but overrides the result of the dependency() function. Also ensure that dependency() always returns the same result when looking for the same dependency, this fixes cases where parts of the project could be using a system library and other parts use the library provided by a subproject.
2020-03-06Update Users.mdAmit D1-0/+10
2020-03-06ast: Implement dummy evaluate_notstatementDaniel Mensinger2-0/+6
2020-03-06ast: Do not resolve dict keysXavier Claessens1-1/+1
Fixes: #6748
2020-03-05Make use of unholderDylan Baker8-112/+43
We have a lot of cases of code like: ```python if hasattr(var, 'held_object'): var = var.held_object` ``` replace that with the unholder function.
2020-03-05mypy: Ignore missing importsDylan Baker1-1/+2
Otherwise modules like tqdm will cause mypy to emit an error, since they're untyped.
2020-03-05ci: Add mesonlib to modules to lint with mypyDylan Baker1-1/+1
2020-03-05dependencies/boost: Fix a number of mypy issuesDylan Baker1-8/+8
Since mypy can now see type information for mesonlib it can determine a number of potential errors in the boost module, this fixes those.
2020-03-05dependencies: Use CompilerType not CompilerDylan Baker1-2/+2
Compiler is invariant, in other words Compiler and only Compiler can fulfull it, it's derived classes cannot be used. CompilerType is covariant, that is Compiler and any derived class can fulfill it. This fixes a number of issues in the boost module.
2020-03-05remove ability to pass multiple keys to extract_as_listDylan Baker6-20/+10
This makes the typing annotations basically impossible to get right, but if we only have one key then it's easy. Fortunately python provides comprehensions, so we don't even need the ability to pass multiple keys, we can just [extract_as_list(kwargs, c) for c in ('a', 'b', 'c')] and get the same result.
2020-03-05Remove some uses of mesonlib.run_onceDylan Baker2-5/+4
These are basically doing what mlog.log(..., once=True) does, so lets just use that. The once argument to mlog is newer, so these probably should have been changed already.
2020-03-05mesonlib: use mlog instead of printDylan Baker1-2/+2
2020-03-05mesonlib: Replace unholder argument to listifyDylan Baker7-52/+51
listify shouldn't be unholdering, it's a function to turn scalar values into lists, or flatten lists. Having a separate function is clearer, easier to understand, and can be run recursively if necessary.
2020-03-05mesonbuild/mesonlib: Add type annotationsDylan Baker5-125/+230
2020-03-04mesonlib: Fix File.__eq__ to return NotImplementedDylan Baker1-0/+2
The implementation assumes another File, but doesn't properly guard that. Let's do that guarding.
2020-03-04mesonlib: Use textwrap.dedentDylan Baker1-4/+7
This is mostly just to help folding editors like vim, which get confused by the non-indented code. It also helps readability, IMHO.
2020-03-05unit tests: Test the buildtype table in the docsNirbheek Chauhan1-0/+23
2020-03-05unit tests: Rewrite documentation table parsing codeNirbheek Chauhan1-32/+44
The old logic was completely broken, and didn't even assert that the specified section was found at all. The CPU families test was broken because of this. Luckily, the table didn't go out of sync with the code. It now also doesn't assume that each section has only one table. This fixes the test now that we document the buildtype/optimization/debug mapping in a second table inside the `Universal options` section.
2020-03-05Document the details of optimization+debug vs buildtype [skip ci]Nirbheek Chauhan1-0/+17
Otherwise you have to hunt through the source code. Specifically, this is defined in `mesonbuild/coredata.py`: `set_buildtype_from_others()` and `set_others_from_buildtype()`
2020-03-04mesonbuild: Add mcompile commandDylan Baker5-2/+163
This is tested working with both msbuild and ninja/samu. Since our xcode support is pretty much broken I didn't bother. Fixes #6670
2020-03-04interpreter: add 'name' method to BuildTargetHolderStéphane Cerveau5-2/+13
As any child of BuildTargetHolder might need the name of the object, provides a method to get object name. This is useful in gst-build to display the plugin name and not the filename.
2020-03-03Set c_winlibs/cpp_winlibs for Clang in the same way as for GCCMartin Storsjö2-0/+12
clang-cl is handled as a separate case (ClangClCCompiler), which already gets c_winlibs from VisualStudioLikeCCompilerMixin.
2020-03-03Cherry-picking - (rm python2 % add python3 .format) (#6725)Michael Brockus6-70/+65
2020-03-03pkgconfig: Fix deprecation message (fixes #6720)Stéphane Cerveau1-2/+1
Deprecation warning was unable to display because of patch c8f8d58273a40d94c820dccab54a7ae2d948cb8a fixes #6720
2020-03-02fix typoMichael1-1/+1
2020-03-02add -C to meson initMichael2-0/+12
2020-03-02Merge pull request #6316 from mensinda/typesAstDylan Baker15-639/+700
types: Annotations for ast, mparser.py, interpreterbase.py