aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-05-08Allow indexed custom target to be used in executable's depends.Szabi Tolnai4-1/+43
Change-Id: I7f3e0e0dd9c413d7f6e3267de9664b89f2294e27
2020-05-08More robust cmake version detectionReza Housseini1-1/+1
2020-05-08Do not pass rpath flags to wasm-ldAndrei Alexeyev1-0/+5
2020-05-08rename unstable-kconfig to unstable-keyvalPaolo Bonzini17-33/+40
Discussions in #6524 have shown that there are various possible uses of the kconfig module and even disagreements in the exact file format between Python-based kconfiglib and the tools in Linux. Instead of trying to reconcile them, just rename the module to something less suggestive and leave any policy to meson.build files. In the future it may be possible to add some kind of parsing through keyword arguments such as bool_true, quoted_strings, etc. and possibly creation of key-value lists too. For now, configuration_data objects provide an easy way to access quoted strings. Note that Kconfig stores false as "absent" so it was already necessary to write "x.has_key('abc')" rather than the more compact "x['abc']". Therefore, having to use configuration_data does not make things much more verbose.
2020-05-07docs/Precompiled-headers: minor spell check. [skip ci]Wenjian He1-1/+1
a give target -> a given target Proposed by #7081 .
2020-05-07Allow overriding g-ir-scanner and g-ir-compiler binaries.James Hilliard1-2/+10
This is useful when one needs to force meson to use wrappers for cross compilation. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2020-05-07envconfig: Always honor PKG_CONFIG_PATHDylan Baker1-1/+1
The comment for this code is correct, but the code itself isn't. The way it's implemented in a cross compile we don't look at PKG_CONFIG_PATH at all. Fixes: #7062
2020-05-06Merge pull request #7064 from dcbaker/gtest-protocolJussi Pakkanen10-86/+239
Add support for Gtest as a test protocol
2020-05-06Merge pull request #7076 from mesonbuild/revertcrossfixupJussi Pakkanen4-1/+15
Revert cross fixup
2020-05-04docs/unit-tests: Add information about output filesDylan Baker1-0/+25
2020-05-04docs: Reformat unit-tests to be ~80 characters per lineDylan Baker1-41/+84
2020-05-04Add native support for gtest testsDylan Baker7-20/+78
Gtest can output junit results with a command line switch. We can parse this to get more detailed results than the returncode, and put those in our own Junit output. We basically just throw away the top level 'testsuites' object, then fixup the names of the tests, and shove that into our junit.
2020-05-04coredata: init IntegerOption choices to the correct valueEric Engestrom1-3/+3
It's not a boolean, so let's avoid initializing it to invalid choices followed by assigning it valid ones.
2020-05-04Add regression test for libdir reset.Jussi Pakkanen3-0/+14
2020-05-04Revert "coredata: init_builtins should always call libdir_cross_fixup"Jussi Pakkanen1-1/+1
This reverts commit cc4e9e79be54f59a09d8e5ca96c6a2946245a88d.
2020-05-04Fix incremental debug builds in VSGustavoLCR2-2/+3
2020-05-03Merge pull request #7060 from dcbaker/install-script-targetsJussi Pakkanen14-22/+217
Allow meson.add_*_script to take additional types
2020-05-03Merge pull request #7059 from xclaesse/gir-windowsJussi Pakkanen2-2/+10
Fix gir on Windows
2020-05-03rm python2 %s from backends.py and ninjabackend.pyMichael Brockus2-38/+35
2020-05-03boost: Do not set BOOST_ALL_DYN_LINK (fixes #7056)Daniel Mensinger1-5/+2
2020-05-02Merge pull request #6838 from dcbaker/link-language-in-librariesJussi Pakkanen9-8/+82
Link language in libraries
2020-05-01docs/Users: add Vala Language ServerPrinceton Ferro1-0/+1
See https://github.com/benwaffle/vala-language-server
2020-05-01boost: Only use usage-requirements defines (fixes #7046)Daniel Mensinger3-58/+93
2020-05-01Document formal Meson grammar [skip ci]Flow-It1-0/+70
* WIP: Document formal Meson grammar * Various little fixes [skip ci] 1) Add missing logical_not_expr 2) 'in' and 'not in' are valid relational operators at least for dicts 3) dictionary keys can be expressions, but kwarg names cannot 4) typo logical_end_expression -> logical_and_expression 5) Make jump statements only allowed inside an iteration statement * Rework EBNF style [skip ci] As there is no good order for the productions, just go alphabetically. The EBNF style was changed to match the one the Python lark project uses, that is colons for productions and terminals enclosed in double quotes. * Add missing production for unary operators [skip ci] * Add production for multiline strings [skip ci] * Properly define terminal symbols [skip ci] Depending on the EBNF flavor, regex can be used to describe the terminal symbols. Lark allows this, and as it was mentioned as a possible user of this grammar, let's follow its flavor here. Most regexes used are easily human-readable, and we can always add comments to more complicated ones. * Small changes to which expressions can be used where [skip ci] Let the grammar be very general. The type system then has to check, that the used expression really evaluates to the correct type. Even if we know today that assignment expressions always evaluate to None (and can therefore only be used as a toplevel expression in an expression statement), this needn't be the case forever. So this way, the grammar stays stable even if such changes were made. * Rework function argument list production [skip ci] * Be more verbose for production names [skip ci] Rename expr -> expression, stmt -> statement, op -> operator, program -> build_definition. Also adjust some list productions. * Add paragraph about syntax stability promises [skip ci]
2020-04-30backend/backends: Fix type annotationDylan Baker1-1/+1
2020-04-30Convert test protocol into an enumDylan Baker4-8/+32
This gives us better type safety, and will be important as we add more test methods
2020-04-30build: cleanup and sort importsDylan Baker1-3/+5
2020-04-30backends/backends: sort and cleanup importsDylan Baker1-10/+14
2020-04-30mtest: use argparse.type to simplify some codeDylan Baker1-2/+1
2020-04-30mtest: Replace if (bool) { return bool; } with return bool;Dylan Baker1-3/+1
2020-04-30Allow get_variable to still function when the fallback is a disabler.James Hilliard3-1/+31
2020-04-30Update test.json schema to add stdoutJon Turney2-3/+28
Update the test.json schema, adding the 'stdout' property. Also amend the test.json schema so the presence of an unexpected property on the root object causes a validation error. v2: Also add 'tools' property to json schema. Amend the documentation not to use the word 'list' to describe a dict.
2020-04-30Update dircondenser.py tool to update paths in test.json as wellJon Turney1-0/+4
Update dircondenser.py tool to update paths appearing in the expected stdout in test.json when the containing directory is renamed.
2020-04-30Add expected stdout for failing-meson and warning-meson testsJon Turney97-10/+722
Initially produced using: for d in "test cases/failing/"* ; do rm -r _build ; ./meson.py setup "$d" _build | grep ERROR >"$d"/expected_stdout.txt; done then converted to json with jq using: jq --raw-input --slurp 'split("\n") | {stdout: map({line: select(. != "")})}' expected_stdout.txt >test.json or merged with existing json using: jq --slurp '.[0] + .[1]' test.json expected.json >test.json.new v2: Add some comments to explain the match when it isn't totally obvious v3: Add or adjust existing re: in expected output to handle '/' or '\' path separators appearing in message, not location. v4: Put expected stdout in test.json, rather than a separate expected_stdout.txt file Park comments in an unused 'comments' key, as JSON doesn't have a syntax for comments
2020-04-30Add a mechanism for validating meson output in testsJon Turney2-0/+80
Expected stdout lines must match lines from the actual stdout, in the same order. Lines with match type 're' are regex matched. v2: Ignore comment lines in expected_stdout v3: Automatically adjust path separators for location in expected output v4: Put expected stdout in test.json, rather than a separate file
2020-04-30Cosmetic tweak to error message for incdir() with an absolute pathJon Turney1-2/+3
Cosmetic tweak to the error message for incdir() with an absolute path. Don't split the message in the middle of a sentence at a point which may or may not correspond to the terminal width.
2020-04-30Check before compiler detection if 'c' language is present when adding 'vala'Jon Turney1-5/+6
For the sake of a consistent error message (irrespective of if 'valac' is present or not), check if the 'c' language is present if we are adding 'vala' before (rather than after) we do compiler detection.
2020-04-30Be more careful about the use of repr() in error messagesJon Turney3-4/+7
Generally, we'd want to use str() rather than repr() in error messages anyhow, as that explicitly gives something designed to be read by humans. Sometimes {!r} is being used as a shortcut to avoid writing the quotes in '{!s}'. Unfortunately, these things aren't quite the same, as the repr of a string containing '\' (the path separator on Windows) will have those escaped. We don't have a good string representation to use for the arbitrary internal object used as an argument for install_data() when it's neither a string nor file (which doesn't lead to a good error message), so drop that for the moment.
2020-04-30Skip failing tests when they won't fail in the expected wayJon Turney14-11/+60
2020-04-30Make colourize_console() a functionJon Turney3-13/+30
Currently, colourize_console is a constant, set at process initialization. To allow the actual stdout to be easily compared with the expected when running tests, we want to allow colourization to be on for the test driver, but not for the in-process configure done by run_configure, which has stdout redirected from a tty to a pipe. v2: Cache _colorize_console per file object v3: Reset cache on setup_console()
2020-04-30Docs: Update link_language docs to explain when it should be usedDylan Baker2-2/+14
2020-04-30interpreter: Add link_language to all build targetsDylan Baker4-2/+15
If the feature hadn't been broken in the first place it would have worked on them anyway, so we might as well expose it. I'm loathe to do it because one of the best features of meson in a mixed C/C++ code base is that meson figures out the right linker every time, but there are cases people have where they want to force a linker. We'll let them keep the pieces.
2020-04-30build: Fix link_language selectionDylan Baker1-4/+6
Currently it does nothing, as the field is read too late, and additional languages have already been considered. As such if the language requested is closer to C (for example you want C but have a C++ source with only extern C functions) then link_langauge is ignored. Fixes #6453
2020-04-30unittests: Add test to show that link_language is brokenDylan Baker1-0/+15
2020-04-30tests: Add common test for link_languageDylan Baker4-0/+32
It's cool we have a fortran test, but we should have a C/C++ test, especially for C++ extern "C".
2020-04-30build: add missing type annotationDylan Baker1-1/+1
2020-04-30docs: Update documentation for add_*_scriptDylan Baker2-0/+31
2020-04-30allow postconf and dist scripts to use Files, ExternalPrograms, andDylan Baker3-7/+15
ConfigureFiles These things are all known to be ready when these scripts are run, and thus they can safely consume them.
2020-04-30interpreter: Allow install_script to use additional input typesDylan Baker10-18/+174
This adds support for Files, CustomTarget, Indexs of CustomTargets, ConfigureFiles, ExternalPrograms, and Executables. Fixes: #1234 Fixes: #3552 Fixes: #6175
2020-04-30CI: pin pylintJon Turney1-1/+2
Pin pylint version to workaround https://github.com/PyCQA/pylint/issues/3524