aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
AgeCommit message (Collapse)AuthorFilesLines
2020-05-11Fix builtin check in has_function() with GCC 10 on WindowsChristoph Reiter1-11/+16
The builtin check had a special case that if a header was provided and the function wasn't defined, it would ignore the builtin to avoid non-functional builtins (for example __builtin_posix_memalign in MSYS2). GCC 10 gained support for __has_builtin() which now skipps this check and because __has_builtin(__builtin_posix_memalign) returns true the non functional builtin is now reported as available. To get the old behaviour back move the special case in front of the actual availability check. Fixes #7113
2020-05-10python: install_sources() should default to pure, following the docMarc-André Lureau1-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>
2020-05-10Improve Emscripten linker version detectionAndrei Alexeyev1-6/+9
2020-05-10boost: Do not be strict about static if not specified (fixes #7057)Daniel Mensinger1-1/+2
2020-05-08Allow indexed custom target to be used in executable's depends.Szabi Tolnai1-1/+1
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 Bonzini1-6/+4
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-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 Pakkanen5-34/+108
Add support for Gtest as a test protocol
2020-05-06Merge pull request #7076 from mesonbuild/revertcrossfixupJussi Pakkanen1-1/+1
Revert cross fixup
2020-05-04Add native support for gtest testsDylan Baker3-9/+56
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-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 VSGustavoLCR1-1/+2
2020-05-03Merge pull request #7060 from dcbaker/install-script-targetsJussi Pakkanen1-14/+64
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 Pakkanen1-6/+9
Link language in libraries
2020-05-01boost: Only use usage-requirements defines (fixes #7046)Daniel Mensinger1-43/+50
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 Hilliard2-1/+3
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-30Make colourize_console() a functionJon Turney1-6/+23
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-30interpreter: Add link_language to all build targetsDylan Baker1-1/+2
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-30build: add missing type annotationDylan Baker1-1/+1
2020-04-30allow postconf and dist scripts to use Files, ExternalPrograms, andDylan Baker1-6/+8
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 Baker1-11/+59
This adds support for Files, CustomTarget, Indexs of CustomTargets, ConfigureFiles, ExternalPrograms, and Executables. Fixes: #1234 Fixes: #3552 Fixes: #6175
2020-04-30gnome: Print proper error when 'nsversion' or 'namespace' are missingXavier Claessens1-2/+6
2020-04-30ExternalProgram: Do special windows tricks even when name is providedXavier Claessens1-0/+4
Closes: #7051
2020-04-29Fix symlink deletion with --wipe optionLaurent Pinchart1-1/+1
When wiping a build tree with --wipe, every entry in the build directory is removed with mesonlib.windows_proof_rmtree() for directories and mesonlib.windows_proof_rm() for other files. Symlinks to directories are considered directories, resulting in the former being called. This causes an exception to be raised, as the implementation calls shutil.rmtree(), which isn't allowed on symlinks. Fix this by using mesonlib.windows_proof_rm() for symlinks. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-04-28Clarified error message for test(). (#7040)Benjamin Frye1-1/+1
Changes the error message for test() so it now reports the expected and actual number of parameters. Fixes: #7029
2020-04-28gnome: Fix usage of gobject-introspection as subprojectXavier Claessens2-59/+42
2020-04-28Adding a conditional case in _guess_files to confirm that the complete path ↵georgev931-1/+16
is put together in even if a portion of the path is a location that exists. For instance if C:/Program Files (x86)/folder is passed to _guess_files, it would resolve to ['C:/Program Files', '(x86)/folder'] since C:/Program Files is an actual file location that can exist.
2020-04-28dependency: log cached or skipped dependencies with reference to modulesEli Schwartz1-5/+8
* dependency: log cached or skipped dependencies with reference to modules If the dependency is a special dependency which takes modules, the modules get cached separately and probably reference different pkg-config files. It's very plausible that we have multiple dependencies, using different modules. For example: Run-time dependency qt5 (modules: Core) found: YES 5.14.2 (pkg-config) Dependency qt5 skipped: feature gui disabled Obviously this makes no sense, because of course we found qt5 and even used it. The second line is a lot more readable if it shows this: Dependency qt5 (modules: Widgets) skipped: feature gui disabled Similar confusion abounds in the case where a module is found in the cache -- which module, exactly, has been found here: Dependency qt5 found: YES 5.14.2 (cached) Rewrite the dependency function to *consistently* pass around (and use!) the display_name even in cases where we know it isn't anonymous (this is just more correct anyway), and make it serve a dual purpose by also appending the list of modules just like we do for pretty-printing that a dependency has just been found for the first time. * fixup! dependency: log cached or skipped dependencies with reference to modules pointlessly cast modules to str, as they cannot be anything else. But we want to fail later on, with something more friendly than a stacktrace. boost/wx have special exceptions for people passing an integer there.
2020-04-28find_program: Fixes when the program has been overridden by executableXavier Claessens2-20/+42
- ExternalProgramHolder has path() method while CustomTargetHolder and BuildTargetHolder have full_path(). - The returned ExternalProgramHolder's path() method was broken, because build.Executable object has no get_path() method, it needs the backend. - find_program('overridden_prog', version : '>=1.0') was broken because it needs to execute the exe that is not yet built. Now assume the program has the (sub)project version. - If the version check fails, interpreter uses ExternalProgramHolder.get_name() for the error message but build.Executable does not implement get_name() method.
2020-04-28Merge pull request #7018 from dcbaker/junitJussi Pakkanen1-29/+145
mtest: Generate JUnit results for tests
2020-04-25wrap: Add support for local files via only `*_filename`Daniel Mensinger2-12/+28
2020-04-24backend/vs: Fix build when not all languages have pchPeter Harris1-10/+4
It is not unheard-of for a project to use pch for C++ but not for C (because C usually builds fast enough anyway, so it's not worth the developer overhead of maintaining the pch file). This code was trying to optimize the vcxproj file size by detecting "only one language", but it was only looking at the number of pch-languages defined. This is incorrect when pch is not defined for all languages in use. Instead of tweaking the optimization further, remove it. This makes the vs backend behave more like the ninja backend.
2020-04-24Adjust regex to handle cases such as C:/Program Files/foldergeorgev931-1/+1