aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts
AgeCommit message (Collapse)AuthorFilesLines
2021-03-16clangformat: Add clang-format-check targetXavier Claessens1-6/+15
2021-03-16clangformat: Add include and ignore filesXavier Claessens1-11/+39
2021-03-16Add `meson devenv` command and meson.add_devenv()Xavier Claessens1-0/+22
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz11-23/+23
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04various python neatness cleanupsEli Schwartz2-2/+2
All changes were created by running "pyupgrade --py3-only --keep-percent-format" and committing the results. I have not touched string formatting for now. - use set literals - simplify .format() parameter naming - remove __future__ - remove default "r" mode for open() - use OSError rather than compatibility aliases - remove stray parentheses in function(generator) scopes
2021-03-04raw string literals are next to godlinessEli Schwartz1-2/+2
Invalid escape sequences are deprecated and will be removed from a future version of python. Use r"" to define them so they remain readable.
2021-02-05run_target: Add env kwargXavier Claessens2-87/+8
Re-implement it in backend using the same code path as for custom_target(). This for example handle setting PATH on Windows when command is an executable.
2021-01-30Merge pull request #8264 from xclaesse/ep-miscJussi Pakkanen1-6/+19
external_project: misc improvements
2021-01-30Fix executable as script on WindowsXavier Claessens1-10/+16
On Windows this would fail because of missing DLL: ``` mylib = library(...) exe = executable(..., link_with: mylib) meson.add_install_script(exe) ``` The reason is on Windows we cannot rely on rpath to find libraries from build directory, they are searched in $PATH. We already have all that mechanism in place for custom_target() using ExecutableSerialisation class, so reuse it for install/dist/postconf scripts too. This has bonus side effect to also use exe_wrapper for those scripts. Fixes: #8187
2021-01-29external_project: Improve loggingXavier Claessens1-6/+19
Write output of 'make' and 'make install' into log files as well when not verbose.
2021-01-27custom_target: Add env kwargXavier Claessens1-1/+2
2021-01-20Use case-insensitive suffix check for fortranJonas Lundholm Bertelsen1-2/+2
In Fortran it is common to use capital F in the suffix (eg. '.F90') if the source file makes use of preprocessor statements. Such files should probably be treated like all other fortran files by meson. Case insensitivity for suffixes was already implemented several places in meson before this. So most likely, the few places changed here were oversights anyway.
2021-01-14Merge pull request #8192 from dcbaker/submit/minstall-type-annotationsJussi Pakkanen1-4/+4
Add type annotations to minstall (and some related cleanups)
2021-01-13scripts/depfixer: make rpaths_dirs_to_remove a setDylan Baker1-4/+4
It's only used for doing an `if x in container` check, which will be faster with a set, and the only caller already has a set, so avoid we can avoid a type conversion as well.
2021-01-13Fix misspellsAntonin Décimo2-2/+2
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2021-01-04Use a single coredata dictionary for optionsDylan Baker1-1/+2
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).
2020-12-25Extend the C++ module scanner to handle Fortran, too.Jussi Pakkanen1-19/+129
2020-12-22depfixer: split new rpath into multiple entries for dedup comparisonsAlan Coopersmith1-1/+1
Fixes: #8115 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-12-13Add mypy annotations.Jussi Pakkanen1-11/+13
2020-12-13Scan all C++ sources and ignore everything else.Jussi Pakkanen1-0/+2
2020-12-13C++ module compilation works for a simple project.Jussi Pakkanen1-0/+87
2020-12-10Respect MESON_INSTALL_QUIET in gettext.pyDaan De Meyer1-1/+2
Fixes #8068.
2020-11-17Collect and return clang-format's return codeFlorian Schmaus1-3/+4
There is no reason why meson should swallow any non-zero exit(/return) code of clang-format.
2020-11-17Fix clang-tidy return value reporting (Part â…¡)Florian Schmaus1-1/+1
It turns out my first attempt to fix this in 00d5ef3191e5 ("Fix clang-tidy return value reporting (#7949)") is not sufficient: The local variable returncode is never updated and stays at 0. This fixes the returncode calculation. Fixes: cce172432be3 ("Use run-clang-tidy when available.")
2020-11-07Fix clang-tidy return value reporting (#7949)Florian Schmaus1-5/+4
* Fix clang-tidy return value reporting In case clang-tidy is invoked manually, i.e. if run-clang-tidy(.py) is not found, Meson would not report the return value. This is caused by ignoring the return value of manual_clangformat() in clangformat() within mesonbuild/scripts/clangtidy.py. Even though only more recent-versions of clang-tidy actually report an non-zero exit code if errors are found, there is no reason Meson shouldn't simply report any error codes it received from clang-tidy. Fixes #7948. * Rename methods in clangtidy.py from clangformat to clangtidy For some unknown reason, the method names in clangtidy.py are clangformat() and manual_clangformat(). This is confusing, as clang-format is not invoked by them, clang-tidy is. Hence rename those from {manual_}clangformat() → {manual_}clangtidy()
2020-11-04symbolextractor: Add FreeBSD supportThibault Payet1-0/+20
2020-11-01Fix #5492 (#7919)Elliot1-5/+19
* fix 5492 with cleaner code * remove argparse import * replace list(map( with list comprehension * pass str rather than Path to get_cmd_line_file
2020-10-12exclude generated file from clang-tidy processingMichele Dionisio1-1/+3
by default run_clang_tidy process al file in compile_commands.json but the file generated has to be esclude like already done from manual_clangformat
2020-10-05Never run clang-format / clang-tidy against directoriesBernd Busse2-0/+4
`pathlib.Path.glob()` also returns directories that match source filenames (i.e. a directory named `test.h/`), but `clang-format` and `clang-tidy` fail when handed a directory. We manually skip calling `clang-format` and `clang-tidy` on those directories.
2020-09-20Make meson_exe report pickled command when it failsJon Turney1-1/+5
Make 'meson --internal exe --unpickle' report the actual command executed when it fails, which is otherwise invisible.
2020-09-13externalproject: Fix typing annotationXavier Claessens1-3/+3
2020-09-13external-project: Add typing annotationXavier Claessens1-4/+5
2020-09-13external-project: New module to build configure/make projectsXavier Claessens1-0/+95
This adds an experimental meson module to build projects with other build systems. Closes: #4316
2020-09-08typing: fix code reviewDaniel Mensinger1-1/+1
2020-09-08typing: get rid of most T.castDaniel Mensinger2-7/+11
2020-09-08typing: more fixesDaniel Mensinger2-2/+2
2020-09-08typing: fully annotate scriptsDaniel Mensinger22-152/+182
2020-09-04environment: use ExternalProgram to find ninjaPaolo Bonzini1-1/+1
This allows the NINJA environment variable to support all the Windows special cases, especially allowing an absolute path without extension. Based on a patch by Yonggang Luo. Fixes: #7659 Suggested-by: Nirbheek Chauhan <nirbheek@centricular.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-02symbolextractor: Handle PermissionError when running toolNirbheek Chauhan1-0/+5
I can't reproduce this, but it is definitely possible. In this case what we should do is the same as when the tool is not found. Fixes https://github.com/mesonbuild/meson/issues/7605
2020-08-30meson_exe: Remove two unused functionsChristoph Reiter1-9/+0
2020-08-30Dedup final install rpath.Jussi Pakkanen1-6/+9
2020-08-20simplify shutil usage by invoking copy2 where appropriateEli Schwartz2-4/+2
It's equivalent to copyfile + copystat with the same arguments.
2020-08-07Better log message on rpath error.Jussi Pakkanen1-1/+2
2020-07-07symbolextractor: use try/finally in solaris_syms when wrapping gnu_symsAlan Coopersmith1-3/+5
As suggested by dcbaker in https://github.com/mesonbuild/meson/pull/7370#pullrequestreview-436872661 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-06-30Move mesonbuild/cmake/data/run_ctgt.py to ↵georgev931-0/+100
mesonbuild/scripts/cmake_run_ctgt.py, as well as enclose everything in a run() function so it can be called by `meson --internal cmake_run_ctgt ...`. Also, include mesonbuild/cmake/data/ in the msi package.
2020-06-22symbolextractor: Add support for SolarisAlan Coopersmith1-0/+9
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-06-17coverage: llvm-cov supportCary Converse1-12/+34
2020-06-13Also adjust PATH in gtkdochelper for CygwinJon Turney1-3/+5
Also do Windows loader specific PATH adjustment (to emulate rpath) in gtkdochelper for Cygwin.
2020-05-18Merge pull request #7103 from dankegel/bug4027-rpath-rememberJussi Pakkanen1-8/+24
Let .pc files and LDFLAGS provide rpaths.
2020-05-18symbolextractor: add OpenBSD supportAntoine Jacoutot1-0/+19