Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
This replaces all of the Apache blurbs at the start of each file with an
`# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing
uses to be consistent in capitalization, and to be placed above any
copyright notices.
This removes nearly 3000 lines of boilerplate from the project (only
python files), which no developer cares to look at.
SPDX is in common use, particularly in the Linux kernel, and is the
recommended format for Meson's own `project(license: )` field
|
|
Performed using https://github.com/ilevkivskyi/com2ann
This has no actual effect on the codebase as type checkers (still)
support both and negligible effect on runtime performance since
__future__ annotations ameliorates that. Technically, the bytecode would
be bigger for non function-local annotations, of which we have many
either way.
So if it doesn't really matter, why do a large-scale refactor? Simple:
because people keep wanting to, but it's getting nickle-and-dimed. If
we're going to do this we might as well do it consistently in one shot,
using tooling that guarantees repeatability and correctness.
Repeat with:
```
com2ann mesonbuild/
```
|
|
If an re call fails to find a match it returns None. We're not checking
that, and crashing.
Fixes: #11376
|
|
Union types that exist solely for use as annotations don't need to be
created in normal runs.
|
|
|
|
|
|
Imported both inside and outside of T.TYPE_CHECKING, the runtime import
can be removed by quote-deferring one of the use sites.
Update:
In between then and now, this got removed from T.TYPE_CHECKING, move it
back there rather than preserving the runtime import.
|
|
I ran into one of these from LGTM, and it would be nice if pylint could
warn me as part of my local development process instead of waiting for
the CI to tell me.
|
|
|
|
Dependencies is already a large and complicated package without adding
programs to the list. This also allows us to untangle a bit of spaghetti
that we have.
|
|
performed by running "pyupgrade --py36-plus" and committing the results
|
|
This causes the variable to be read up front and stored, rather than be
re-read on each invocation of meson.
This does have two slight behavioral changes. First is the obvious one
that changing the variable between `meson --reconfigure` invocations has
no effect. This is the way PKG_CONFIG_PATH already works. The second
change is that CMAKE_PREFIX_PATH the env var is no longer appended to
the values set in the machine file or on the command line, and is
instead replaced by them. CMAKE_PREFIX_PATH is the only env var in meson
that works this way, every other one is replaced not appended, so while
this is a behavioral change, I also think its a bug fix.
|
|
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).
|
|
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.
|
|
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
|
|
|
|
|
|
|
|
|
|
It's not enough to detect that the linker is ld64: gcc, icc, and vanilla
clang all use ld64 on macoOS. Instead we have to detect the class of the
compiler, and determine if it's an Apple Compiler or a vanilla one.
|
|
Meson and CMake compiler ids are different. This commit adds a mapping
from the meson list:
https://mesonbuild.com/Reference-tables.html#compiler-ids
to the CMake list:
https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html
The mapping is not 1-1, and not all entries are mapped, so this is
a best-effort attempt. Fallback to GNU as before to try to limp along
and hope that the build files don't rely on an accurate compiler ID.
|
|
Without this, MSVC and MSVC_VERSION won't be set by CMake during
platform detection, and the compiler will be an undefined mixture of
GNU and MSVC. In particular, find_package(opencv) will fail on Windows
when building with MSVC.
|
|
This is obviously wrong, since on Windows ':' is in the drive letter.
Causes us to call cmake with `-DCMAKE_PREFIX_PATH=c;\foo\bar`.
|
|
|
|
Otherwise we can end up finding dependencies from the build machine for
the host machine, which is incorrect. This alters cmake, pkg-config, and
all config-tool based dependencies.
Fixes: #7276
|
|
|
|
|
|
|
|
On some systems the binary 'cmake' for version 3 is named 'cmake3',
therefor printing its version number prints:
'cmake3 version X.Y.Z' instead of 'cmake version X.Y.Z'
This '3' digit in the middle breaks the regular expression
extracting the version number.
The following fix permit both way to work and the regexp to
match the proper version number.
Signed-off-by: Alexandre Lavigne <alexandre.lavigne@scality.com>
|
|
Fix #3969
|
|
|
|
This moves most of the execution code from the CMakeInterpreter
into CMakeExecutor. Also, CMakeTraceParser is now responsible
for determining the trace cmd arguments.
|
|
|
|
mesonlib.Popen_safe() doesn't work with the case where undecodeable
binary data comes back from CMake or compiler, so we use subprocess.run()
|
|
|
|
|
|
|
|
|
|
|