mirror of
https://github.com/mesonbuild/meson.git
synced 2026-06-30 19:57:45 +00:00
committed by
Eli Schwartz
parent
ccb15bc0e9
commit
39ede12aa5
@@ -243,8 +243,8 @@ _arguments \
|
||||
"$__meson_cd"
|
||||
'(-n --name)'{'-n','--name'}'=[the name of the project (defaults to directory name)]'
|
||||
'(-e --executable)'{'-e','--executable'}'=[the name of the executable target to create (defaults to project name)]'
|
||||
'(-d --deps)'{'-d','--deps'}'=[comma seperated list of dependencies]'
|
||||
'(-l --language)'{'-l','--language'}'=[comma seperated list of languages (autodetected based on sources if unset)]:languages:_values , (c cpp cs cuda d fortran java objc objcpp rust)'
|
||||
'(-d --deps)'{'-d','--deps'}'=[comma separated list of dependencies]'
|
||||
'(-l --language)'{'-l','--language'}'=[comma separated list of languages (autodetected based on sources if unset)]:languages:_values , (c cpp cs cuda d fortran java objc objcpp rust)'
|
||||
'(-b --build)'{'-b','--build'}'[build the project immediately after generation]'
|
||||
'--builddir=[directory for building]:directory:_directories'
|
||||
'(-f --force)'{'-f','--force'}'[overwrite any existing files and directories]'
|
||||
@@ -301,7 +301,7 @@ _arguments \
|
||||
(( $+functions[_meson-dist] )) || _meson-dist() {
|
||||
local curcontext="$curcontext"
|
||||
local -a specs=(
|
||||
'--formats=[comma seperated list of archive types to create]:archive formats:_values -s , format '"$__meson_dist_formats"
|
||||
'--formats=[comma separated list of archive types to create]:archive formats:_values -s , format '"$__meson_dist_formats"
|
||||
'--include-subprojects[Include source code of subprojects that have been used for the build]'
|
||||
'--no-tests[Do not build and test generated packages]'
|
||||
"$__meson_cd"
|
||||
|
||||
@@ -231,7 +231,7 @@ Most of the time this would be used either by the parent project by setting
|
||||
subproject's default_options (e.g. `subproject('foo', default_options: 'default_library=static')`),
|
||||
or by the user using the command line `-Dfoo:default_library=static`.
|
||||
|
||||
The value is overriden in this order:
|
||||
The value is overridden in this order:
|
||||
- Value from parent project
|
||||
- Value from subproject's default_options if set
|
||||
- Value from subproject() default_options if set
|
||||
|
||||
@@ -59,7 +59,7 @@ Builds a default or a specified target of a configured meson project.
|
||||
- `PATH`: path to the target relative to the root `meson.build` file. Note: relative path for a target specified in the root `meson.build` is `./`.
|
||||
- `TYPE`: type of the target. Can be one of the following: 'executable', 'static_library', 'shared_library', 'shared_module', 'custom', 'run', 'jar'.
|
||||
|
||||
`PATH` and/or `TYPE` can be ommited if the resulting `TARGET` can be used to uniquely identify the target in `meson.build`.
|
||||
`PATH` and/or `TYPE` can be omitted if the resulting `TARGET` can be used to uniquely identify the target in `meson.build`.
|
||||
|
||||
#### Backend specific arguments
|
||||
|
||||
|
||||
@@ -273,7 +273,7 @@ The `shared_lib` and `pdb` types takes an optional additional parameter, `versio
|
||||
}
|
||||
```
|
||||
|
||||
This will be applied appropriatly per platform. On windows this expects `lib.dll` and `lib-1.dll`. on MacOS it expects `liblib.dylib` and `liblib.1.dylib`. On other Unices it expects `liblib.so`, `liblib.so.1`, and `liblib.so.1.2.3`.
|
||||
This will be applied appropriately per platform. On windows this expects `lib.dll` and `lib-1.dll`. on MacOS it expects `liblib.dylib` and `liblib.1.dylib`. On other Unices it expects `liblib.so`, `liblib.so.1`, and `liblib.so.1.2.3`.
|
||||
|
||||
If the `platform` key is present, the installed file entry is only considered if
|
||||
the platform matches. The following values for `platform` are currently supported:
|
||||
|
||||
@@ -112,7 +112,7 @@ project's test suite.
|
||||
|
||||
### Properties
|
||||
|
||||
In addition to the properites allowed in [all machine
|
||||
In addition to the properties allowed in [all machine
|
||||
files](Machine-files.md#properties), the cross file may contain specific
|
||||
information about the cross compiler or the host machine. It looks like this:
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ fs.is_absolute('foo/bar') # false, even if ./foo/bar exists
|
||||
### hash
|
||||
|
||||
The `fs.hash(filename, hash_algorithm)` method returns a string containing
|
||||
the hexidecimal `hash_algorithm` digest of a file.
|
||||
the hexadecimal `hash_algorithm` digest of a file.
|
||||
`hash_algorithm` is a string; the available hash algorithms include:
|
||||
md5, sha1, sha224, sha256, sha384, sha512.
|
||||
|
||||
@@ -84,7 +84,7 @@ Examples:
|
||||
x = 'foo.txt'
|
||||
y = 'sub/../foo.txt'
|
||||
z = 'bar.txt' # a symlink pointing to foo.txt
|
||||
j = 'notafile.txt' # non-existant file
|
||||
j = 'notafile.txt' # non-existent file
|
||||
|
||||
fs.is_samepath(x, y) # true
|
||||
fs.is_samepath(x, z) # true
|
||||
@@ -93,7 +93,7 @@ fs.is_samepath(x, j) # false
|
||||
p = 'foo/bar'
|
||||
q = 'foo/bar/baz/..'
|
||||
r = 'buz' # a symlink pointing to foo/bar
|
||||
s = 'notapath' # non-existant directory
|
||||
s = 'notapath' # non-existent directory
|
||||
|
||||
fs.is_samepath(p, q) # true
|
||||
fs.is_samepath(p, r) # true
|
||||
|
||||
@@ -209,12 +209,12 @@ options section.
|
||||
This is a non exhaustive list of supported variables in the `[properties]`
|
||||
section.
|
||||
|
||||
- `cmake_toolchain_file` specifies an absoulte path to an already existing
|
||||
- `cmake_toolchain_file` specifies an absolute path to an already existing
|
||||
CMake toolchain file that will be loaded with `include()` as the last
|
||||
instruction of the automatically generated CMake toolchain file from meson.
|
||||
(*new in 0.56.0*)
|
||||
- `cmake_defaults` is a boolean that specifies whether meson should automatically
|
||||
generate default toolchain varaibles from other sections (`binaries`,
|
||||
generate default toolchain variables from other sections (`binaries`,
|
||||
`host_machine`, etc.) in the machine file. Defaults are always overwritten
|
||||
by variables set in the `[cmake]` section. The default is `true`. (*new in 0.56.0*)
|
||||
- `cmake_skip_compiler_test` is an enum that specifies when meson should
|
||||
@@ -222,7 +222,7 @@ section.
|
||||
sanity checks. This only has an effect if `cmake_defaults` is `true`.
|
||||
Supported values are `always`, `never`, `dep_only`. The default is `dep_only`.
|
||||
(*new in 0.56.0*)
|
||||
- `cmake_use_exe_wrapper` is a boolean that controlls whether to use the
|
||||
- `cmake_use_exe_wrapper` is a boolean that controls whether to use the
|
||||
`exe_wrapper` specified in `[binaries]` to run generated executables in CMake
|
||||
subprojects. This setting has no effect if the `exe_wrapper` was not specified.
|
||||
The default value is `true`. (*new in 0.56.0*)
|
||||
@@ -235,7 +235,7 @@ All variables set in the `[cmake]` section will be added to the generate CMake
|
||||
toolchain file used for both CMake dependencies and CMake subprojects. The type
|
||||
of each entry must be either a string or a list of strings.
|
||||
|
||||
**Note:** All occurances of `\` in the value of all keys will be replaced with
|
||||
**Note:** All occurrences of `\` in the value of all keys will be replaced with
|
||||
a `/` since CMake has a lot of issues with correctly escaping `\` when
|
||||
dealing with variables (even in cases where a path in `CMAKE_C_COMPILER`
|
||||
is correctly escaped, CMake will still trip up internaly for instance)
|
||||
|
||||
@@ -184,7 +184,7 @@ Project name: featurenew
|
||||
Project version: undefined
|
||||
Build machine cpu family: x86_64
|
||||
Build machine cpu: x86_64
|
||||
WARNING: Project targetting '>=0.43' but tried to use feature introduced in '0.44.0': configuration_data.get_unquoted()
|
||||
WARNING: Project targeting '>=0.43' but tried to use feature introduced in '0.44.0': configuration_data.get_unquoted()
|
||||
Message: bar
|
||||
Build targets in project: 0
|
||||
WARNING: Project specifies a minimum meson_version '>=0.43' which conflicts with:
|
||||
|
||||
@@ -263,7 +263,7 @@ that also provide a tool like protoc.
|
||||
Now, by default `shared_library()` sets `-compatibility_version` and
|
||||
`-current_version` of a macOS dylib using the `soversion`.
|
||||
|
||||
This can be overriden by using the `darwin_versions:` kwarg to
|
||||
This can be overridden by using the `darwin_versions:` kwarg to
|
||||
[`shared_library()`](Reference-manual.md#shared_library). As usual, you can
|
||||
also pass this kwarg to `library()` or `build_target()` and it will be used in
|
||||
the appropriate circumstances.
|
||||
|
||||
@@ -105,7 +105,7 @@ This allows IDE integration to get information about the project before the user
|
||||
Before you could use `meson.py introspect --projectinfo build-directory`.
|
||||
Now you also can use `meson.py introspect --projectinfo project-dir/meson.build`.
|
||||
|
||||
The output is similiar to the output with a build directory but additionally also includes information from `introspect --buildsystem-files`.
|
||||
The output is similar to the output with a build directory but additionally also includes information from `introspect --buildsystem-files`.
|
||||
|
||||
For example `meson.py introspect --projectinfo test\ cases/common/47\ subproject\ options/meson.build`
|
||||
This outputs (pretty printed for readability):
|
||||
|
||||
@@ -252,7 +252,7 @@ targets.
|
||||
For those trying to ensure native and cross builds to the same platform produced
|
||||
the same result, the old way was frustrating because very different invocations
|
||||
were needed to affect the same targets, if it was possible at all. Now, the same
|
||||
command line arguments affect the same targets everwhere --- Meson is closer to
|
||||
command line arguments affect the same targets everywhere --- Meson is closer to
|
||||
ignoring whether the "overall" build is native or cross, and just caring about
|
||||
whether individual targets are for the build or host machines.
|
||||
|
||||
@@ -323,7 +323,7 @@ It should be noted that not all projects are guaranteed to work. The
|
||||
safest approach would still be to create a `meson.build` for the
|
||||
subprojects in question.
|
||||
|
||||
## Multipe cross files can be specified
|
||||
## Multiple cross files can be specified
|
||||
|
||||
`--cross-file` can be passed multiple times, with the configuration files overlaying the same way as `--native-file`.
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ Add `dependency('blocks')` to use the Clang blocks extension.
|
||||
|
||||
## Meson's builtin b_lundef is now supported on macOS
|
||||
|
||||
This has always been possible, but there are some addtional restrictions on
|
||||
This has always been possible, but there are some additional restrictions on
|
||||
macOS (mainly do to Apple only features). With the linker internal
|
||||
re-architecture this has become possible
|
||||
|
||||
@@ -133,7 +133,7 @@ A new `version` keyword argument has been added to `find_program` to specify
|
||||
the required version. See [`dependency()`](#dependency) for argument format.
|
||||
The version of the program is determined by running `program_name --version`
|
||||
command. If stdout is empty it fallbacks to stderr. If the output contains more
|
||||
text than simply a version number, only the first occurence of numbers separated
|
||||
text than simply a version number, only the first occurrence of numbers separated
|
||||
by dots is kept. If the output is more complicated than that, the version
|
||||
checking will have to be done manually using [`run_command()`](#run_command).
|
||||
|
||||
@@ -163,7 +163,7 @@ lib2 = static_library(sources, link_with : lib1, install : true)
|
||||
```
|
||||
- pkg-config generator do not include uninstalled static libraries. In the example
|
||||
below, the generated `.pc` file used to be unusable because it contained
|
||||
`Libs.private: -llib1` and `lib1.a` is not installed. `lib1` is now ommitted
|
||||
`Libs.private: -llib1` and `lib1.a` is not installed. `lib1` is now omitted
|
||||
from the `.pc` file because the `link_with:` has been promoted to
|
||||
`link_whole:` (see above) and thus lib1 is not needed to use lib2.
|
||||
```meson
|
||||
|
||||
@@ -199,7 +199,7 @@ skip_sanity_check = true
|
||||
## Support for overiding the linker with ldc and gdc
|
||||
|
||||
LDC (the llvm D compiler) and GDC (The Gnu D Compiler) now honor D_LD linker
|
||||
variable (or d_ld in the cross file) and is able to pick differnt linkers.
|
||||
variable (or d_ld in the cross file) and is able to pick different linkers.
|
||||
|
||||
GDC supports all of the same values as GCC, LDC supports ld.bfd, ld.gold,
|
||||
ld.lld, ld64, link, and lld-link.
|
||||
@@ -249,7 +249,7 @@ Most of the time this would be used either by the parent project by setting
|
||||
subproject's default_options (e.g. `subproject('foo', default_options: 'default_library=static')`),
|
||||
or by the user using the command line `-Dfoo:default_library=static`.
|
||||
|
||||
The value is overriden in this order:
|
||||
The value is overridden in this order:
|
||||
- Value from parent project
|
||||
- Value from subproject's default_options if set
|
||||
- Value from subproject() default_options if set
|
||||
@@ -276,7 +276,7 @@ and avoid a system directories use.
|
||||
|
||||
Meson now ships with predefined project templates for `Java`,
|
||||
`Cuda`, `Objective-C++`, and `C#`, we provided with associated
|
||||
values for corresponding languages, avalable for both library,
|
||||
values for corresponding languages, available for both library,
|
||||
and executable.
|
||||
|
||||
## Ninja version requirement bumped to 1.7
|
||||
|
||||
@@ -23,7 +23,7 @@ Usage: `meson compile [TARGET [TARGET...]]`
|
||||
`PATH`: path to the target relative to the root `meson.build` file. Note: relative path for a target specified in the root `meson.build` is `./`.
|
||||
`TYPE`: type of the target (e.g. `shared_library`, `executable` and etc)
|
||||
|
||||
`PATH` and/or `TYPE` can be ommited if the resulting `TARGET` can be used to uniquely identify the target in `meson.build`.
|
||||
`PATH` and/or `TYPE` can be omitted if the resulting `TARGET` can be used to uniquely identify the target in `meson.build`.
|
||||
|
||||
For example targets from the following code:
|
||||
```meson
|
||||
|
||||
@@ -95,7 +95,7 @@ the usual way. A list of backends can be obtained with `meson setup --help`.
|
||||
|
||||
Sometimes you want to add extra compiler flags, this can be done by passing
|
||||
them in environment variables when calling meson. See [the reference
|
||||
tables](Reference-tables.md#compiler-and-linker-flag-envrionment-variables) for
|
||||
tables](Reference-tables.md#compiler-and-linker-flag-environment-variables) for
|
||||
a list of all the environment variables. Be aware however these environment
|
||||
variables are only used for the native compiler and will not affect the
|
||||
compiler used for cross-compiling, where the flags specified in the cross file
|
||||
|
||||
@@ -212,7 +212,7 @@ the following command-line options:
|
||||
calls, and those are meant to be used for sources that cannot be
|
||||
provided by the system, such as copylibs.
|
||||
|
||||
This option may be overriden by `--force-fallback-for` for specific
|
||||
This option may be overridden by `--force-fallback-for` for specific
|
||||
dependencies.
|
||||
|
||||
* **--wrap-mode=forcefallback**
|
||||
|
||||
@@ -92,7 +92,7 @@ Since *0.55.0* those can be used in all wrap types, they were previously reserve
|
||||
Since *0.55.0* it is possible to use only the `source_filename` and
|
||||
`patch_filename` value in a .wrap file (without `source_url` and `patch_url`) to
|
||||
specify a local archive in the `subprojects/packagefiles` directory. The `*_hash`
|
||||
entries are optional when using this method. This method should be prefered over
|
||||
entries are optional when using this method. This method should be preferred over
|
||||
the old `packagecache` approach described below.
|
||||
|
||||
Since *0.49.0* if `source_filename` or `patch_filename` is found in the
|
||||
|
||||
@@ -36,7 +36,7 @@ class Dedup(enum.Enum):
|
||||
|
||||
"""What kind of deduplication can be done to compiler args.
|
||||
|
||||
OVERRIDEN - Whether an argument can be 'overridden' by a later argument.
|
||||
OVERRIDDEN - Whether an argument can be 'overridden' by a later argument.
|
||||
For example, -DFOO defines FOO and -UFOO undefines FOO. In this case,
|
||||
we can safely remove the previous occurrence and add a new one. The
|
||||
same is true for include paths and library paths with -I and -L.
|
||||
@@ -50,7 +50,7 @@ class Dedup(enum.Enum):
|
||||
|
||||
NO_DEDUP = 0
|
||||
UNIQUE = 1
|
||||
OVERRIDEN = 2
|
||||
OVERRIDDEN = 2
|
||||
|
||||
|
||||
class CompilerArgs(collections.abc.MutableSequence):
|
||||
@@ -129,13 +129,13 @@ class CompilerArgs(collections.abc.MutableSequence):
|
||||
dedup = self._can_dedup(a)
|
||||
if a not in pre_flush_set:
|
||||
new.append(a)
|
||||
if dedup is Dedup.OVERRIDEN:
|
||||
if dedup is Dedup.OVERRIDDEN:
|
||||
pre_flush_set.add(a)
|
||||
for a in reversed(self.post):
|
||||
dedup = self._can_dedup(a)
|
||||
if a not in post_flush_set:
|
||||
post_flush.appendleft(a)
|
||||
if dedup is Dedup.OVERRIDEN:
|
||||
if dedup is Dedup.OVERRIDDEN:
|
||||
post_flush_set.add(a)
|
||||
|
||||
#pre and post will overwrite every element that is in the container
|
||||
@@ -219,7 +219,7 @@ class CompilerArgs(collections.abc.MutableSequence):
|
||||
if arg in cls.dedup2_args or \
|
||||
arg.startswith(cls.dedup2_prefixes) or \
|
||||
arg.endswith(cls.dedup2_suffixes):
|
||||
return Dedup.OVERRIDEN
|
||||
return Dedup.OVERRIDDEN
|
||||
if arg in cls.dedup1_args or \
|
||||
arg.startswith(cls.dedup1_prefixes) or \
|
||||
arg.endswith(cls.dedup1_suffixes) or \
|
||||
|
||||
@@ -15,8 +15,8 @@ macro(meson_ps_reload_vars)
|
||||
endmacro()
|
||||
|
||||
macro(meson_ps_disabled_function)
|
||||
message(WARNING "The function '${ARGV0}' is disabled in the context of CMake subporjects.\n"
|
||||
"This should not be an issue but may lead to compilaton errors.")
|
||||
message(WARNING "The function '${ARGV0}' is disabled in the context of CMake subprojects.\n"
|
||||
"This should not be an issue but may lead to compilation errors.")
|
||||
endmacro()
|
||||
|
||||
# Helper macro to inspect the current CMake state
|
||||
|
||||
@@ -603,7 +603,7 @@ class ConverterTarget:
|
||||
except KeyError:
|
||||
return []
|
||||
|
||||
# TODO: Get rid of this once we have propper typing for options
|
||||
# TODO: Get rid of this once we have proper typing for options
|
||||
assert isinstance(res, list)
|
||||
for i in res:
|
||||
assert isinstance(i, str)
|
||||
|
||||
@@ -323,7 +323,7 @@ class CMakeTraceParser:
|
||||
|
||||
def _cmake_add_custom_command(self, tline: CMakeTraceLine, name: T.Optional[str] = None) -> None:
|
||||
# DOC: https://cmake.org/cmake/help/latest/command/add_custom_command.html
|
||||
args = self._flatten_args(list(tline.args)) # Commands can be passed as ';' seperated lists
|
||||
args = self._flatten_args(list(tline.args)) # Commands can be passed as ';' separated lists
|
||||
|
||||
if not args:
|
||||
return self._gen_exception('add_custom_command', 'requires at least 1 argument', tline)
|
||||
|
||||
@@ -98,7 +98,7 @@ class CCompiler(CLikeCompiler, Compiler):
|
||||
opts = super().get_options()
|
||||
opts.update({
|
||||
OptionKey('std', machine=self.for_machine, lang=self.language): coredata.UserComboOption(
|
||||
'C langauge standard to use',
|
||||
'C language standard to use',
|
||||
['none'],
|
||||
'none',
|
||||
)
|
||||
|
||||
@@ -69,7 +69,7 @@ all_languages = lang_suffixes.keys()
|
||||
cpp_suffixes = lang_suffixes['cpp'] + ('h',) # type: T.Tuple[str, ...]
|
||||
c_suffixes = lang_suffixes['c'] + ('h',) # type: T.Tuple[str, ...]
|
||||
# List of languages that by default consume and output libraries following the
|
||||
# C ABI; these can generally be used interchangebly
|
||||
# C ABI; these can generally be used interchangeably
|
||||
clib_langs = ('objcpp', 'cpp', 'objc', 'c', 'fortran',) # type: T.Tuple[str, ...]
|
||||
# List of languages that can be linked with C code directly by the linker
|
||||
# used in build.py:process_compilers() and build.py:get_dynamic_linker()
|
||||
@@ -1199,14 +1199,14 @@ def get_global_options(lang: str,
|
||||
comp: T.Type[Compiler],
|
||||
for_machine: MachineChoice,
|
||||
env: 'Environment') -> 'KeyedOptionDictType':
|
||||
"""Retreive options that apply to all compilers for a given language."""
|
||||
"""Retrieve options that apply to all compilers for a given language."""
|
||||
description = 'Extra arguments passed to the {}'.format(lang)
|
||||
argkey = OptionKey('args', lang=lang, machine=for_machine)
|
||||
largkey = argkey.evolve('link_args')
|
||||
|
||||
# We shouldn't need listify here, but until we have a separate
|
||||
# linker-driver representation and can have that do the combine we have to
|
||||
# do it htis way.
|
||||
# do it this way.
|
||||
compile_args = mesonlib.listify(env.options.get(argkey, []))
|
||||
link_args = mesonlib.listify(env.options.get(largkey, []))
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ class CLikeCompiler(Compiler):
|
||||
retval.append(d)
|
||||
# at this point, it's an ELF file which doesn't match the
|
||||
# appropriate elf_class, so skip this one
|
||||
# stop scanning after the first sucessful read
|
||||
# stop scanning after the first successful read
|
||||
break
|
||||
except OSError:
|
||||
# Skip the file if we can't read it
|
||||
@@ -1271,7 +1271,7 @@ class CLikeCompiler(Compiler):
|
||||
|
||||
def get_has_func_attribute_extra_args(self, name: str) -> T.List[str]:
|
||||
# Most compilers (such as GCC and Clang) only warn about unknown or
|
||||
# ignored attributes, so force an error. Overriden in GCC and Clang
|
||||
# ignored attributes, so force an error. Overridden in GCC and Clang
|
||||
# mixins.
|
||||
return ['-Werror']
|
||||
|
||||
|
||||
@@ -1244,7 +1244,7 @@ class CMakeDependency(ExternalDependency):
|
||||
if not self._cached_isdir(i):
|
||||
continue
|
||||
|
||||
# Check the directory case insensitve
|
||||
# Check the directory case insensitive
|
||||
content = self._cached_listdir(i)
|
||||
candidates = ['Find{}.cmake', '{}Config.cmake', '{}-config.cmake']
|
||||
candidates = [x.format(name).lower() for x in candidates]
|
||||
|
||||
@@ -601,7 +601,7 @@ class BoostDependency(ExternalDependency):
|
||||
libs = [x for x in libs if x.nvsuffix != 'dll'] # Only link to import libraries
|
||||
|
||||
# Only filter by debug when we are building in release mode. Debug
|
||||
# libraries are automatically prefered through sorting otherwise.
|
||||
# libraries are automatically preferred through sorting otherwise.
|
||||
if not self.debug:
|
||||
libs = [x for x in libs if not x.debug]
|
||||
|
||||
|
||||
@@ -490,7 +490,7 @@ def curses_factory(env: 'Environment', for_machine: 'MachineChoice',
|
||||
candidates.append(functools.partial(PkgConfigDependency, pkg, env, kwargs))
|
||||
|
||||
# There are path handling problems with these methods on msys, and they
|
||||
# don't apply to windows otherwise (cygwin is handled seperately from
|
||||
# don't apply to windows otherwise (cygwin is handled separately from
|
||||
# windows)
|
||||
if not env.machines[for_machine].is_windows():
|
||||
if DependencyMethods.CONFIG_TOOL in methods:
|
||||
|
||||
@@ -68,9 +68,9 @@ known_cpu_families = (
|
||||
'x86_64',
|
||||
)
|
||||
|
||||
# It would feel more natural to call this "64_BIT_CPU_FAMILES", but
|
||||
# It would feel more natural to call this "64_BIT_CPU_FAMILIES", but
|
||||
# python identifiers cannot start with numbers
|
||||
CPU_FAMILES_64_BIT = [
|
||||
CPU_FAMILIES_64_BIT = [
|
||||
'aarch64',
|
||||
'alpha',
|
||||
'ia64',
|
||||
@@ -231,7 +231,7 @@ class MachineInfo:
|
||||
self.cpu_family = cpu_family
|
||||
self.cpu = cpu
|
||||
self.endian = endian
|
||||
self.is_64_bit = cpu_family in CPU_FAMILES_64_BIT # type: bool
|
||||
self.is_64_bit = cpu_family in CPU_FAMILIES_64_BIT # type: bool
|
||||
|
||||
def __eq__(self, other: object) -> bool:
|
||||
if not isinstance(other, MachineInfo):
|
||||
|
||||
@@ -3453,7 +3453,7 @@ external dependencies (including libraries) must go to "dependencies".''')
|
||||
continue
|
||||
if name in self.build.find_overrides:
|
||||
exe = self.build.find_overrides[name]
|
||||
extra_info.append(mlog.blue('(overriden)'))
|
||||
extra_info.append(mlog.blue('(overridden)'))
|
||||
return ExternalProgramHolder(exe, self.subproject, self.backend)
|
||||
return None
|
||||
|
||||
|
||||
@@ -893,7 +893,7 @@ The result of this is undefined and will become a hard error in a future Meson r
|
||||
# TODO maybe find a better solution
|
||||
return iobject[index] # type: ignore
|
||||
except IndexError:
|
||||
# We are already checking for the existance of __getitem__, so this should be save
|
||||
# We are already checking for the existence of __getitem__, so this should be save
|
||||
raise InterpreterException('Index %d out of bounds of array of size %d.' % (index, len(iobject))) # type: ignore
|
||||
|
||||
def function_call(self, node: mparser.FunctionNode) -> T.Optional[TYPE_var]:
|
||||
|
||||
@@ -89,7 +89,7 @@ class ParsedTargetName:
|
||||
|
||||
@staticmethod
|
||||
def _is_valid_type(type: str) -> bool:
|
||||
# Ammend docs in Commands.md when editing this list
|
||||
# Amend docs in Commands.md when editing this list
|
||||
allowed_types = {
|
||||
'executable',
|
||||
'static_library',
|
||||
|
||||
@@ -48,8 +48,8 @@ macro(meson_ps_reload_vars)
|
||||
endmacro()
|
||||
|
||||
macro(meson_ps_disabled_function)
|
||||
message(WARNING "The function '${ARGV0}' is disabled in the context of CMake subporjects.\n"
|
||||
"This should not be an issue but may lead to compilaton errors.")
|
||||
message(WARNING "The function '${ARGV0}' is disabled in the context of CMake subprojects.\n"
|
||||
"This should not be an issue but may lead to compilation errors.")
|
||||
endmacro()
|
||||
|
||||
# Helper macro to inspect the current CMake state
|
||||
@@ -373,7 +373,7 @@ class DataFile:
|
||||
mesondata = {
|
||||
'cmake/data/preload.cmake': DataFile(
|
||||
Path('cmake/data/preload.cmake'),
|
||||
'2b4e632aeb74acb2b441880cf85c0b6fcab03e75b182d3077715a97e739a7918',
|
||||
'ce8f30159aab25b92c26c58a219a427d47838bfa0739475221d6c8993b4946e5',
|
||||
file_0_data_preload_cmake,
|
||||
),
|
||||
'dependencies/data/CMakeLists.txt': DataFile(
|
||||
|
||||
@@ -1597,7 +1597,7 @@ def relpath(path: str, start: str) -> str:
|
||||
return path
|
||||
|
||||
def path_is_in_root(path: Path, root: Path, resolve: bool = False) -> bool:
|
||||
# Check wheter a path is within the root directory root
|
||||
# Check whether a path is within the root directory root
|
||||
try:
|
||||
if resolve:
|
||||
path.resolve().relative_to(root.resolve())
|
||||
|
||||
@@ -45,7 +45,7 @@ class FSModule(ExtensionModule):
|
||||
"""
|
||||
path = self._absolute_dir(state, arg)
|
||||
try:
|
||||
# accomodate unresolvable paths e.g. symlink loops
|
||||
# accommodate unresolvable paths e.g. symlink loops
|
||||
path = path.resolve()
|
||||
except Exception:
|
||||
# return the best we could do
|
||||
|
||||
@@ -281,7 +281,7 @@ class HotdocTargetBuilder:
|
||||
|
||||
return os.path.relpath(_dir, os.path.join(self.builddir, self.subdir))
|
||||
|
||||
def check_forbiden_args(self):
|
||||
def check_forbidden_args(self):
|
||||
for arg in ['conf_file']:
|
||||
if arg in self.kwargs:
|
||||
raise InvalidArguments('Argument "%s" is forbidden.' % arg)
|
||||
@@ -290,7 +290,7 @@ class HotdocTargetBuilder:
|
||||
self.include_paths[path] = path
|
||||
|
||||
def make_targets(self):
|
||||
self.check_forbiden_args()
|
||||
self.check_forbidden_args()
|
||||
file_types = (str, mesonlib.File)
|
||||
self.process_known_arg("--index", file_types, mandatory=True, value_processor=self.ensure_file)
|
||||
self.process_known_arg("--project-version", str, mandatory=True)
|
||||
|
||||
@@ -40,7 +40,7 @@ class RustModule(ExtensionModule):
|
||||
|
||||
Rust puts it's unitests inside it's main source files, unlike most
|
||||
languages that put them in external files. This means that normally
|
||||
you have to define two seperate targets with basically the same
|
||||
you have to define two separate targets with basically the same
|
||||
arguments to get tests:
|
||||
|
||||
```meson
|
||||
|
||||
@@ -16,7 +16,7 @@ def run(argsv: T.List[str]) -> int:
|
||||
parser.add_argument('-d', '--directory', type=str, metavar='D', required=True, help='Working directory to cwd to')
|
||||
parser.add_argument('-o', '--outputs', nargs='+', metavar='O', required=True, help='Expected output files')
|
||||
parser.add_argument('-O', '--original-outputs', nargs='*', metavar='O', default=[], help='Output files expected by CMake')
|
||||
parser.add_argument('commands', nargs=argparse.REMAINDER, help='A "{}" seperated list of commands'.format(SEPARATOR))
|
||||
parser.add_argument('commands', nargs=argparse.REMAINDER, help='A "{}" separated list of commands'.format(SEPARATOR))
|
||||
|
||||
# Parse
|
||||
args = parser.parse_args(argsv)
|
||||
|
||||
@@ -164,7 +164,7 @@ class DependencyScanner:
|
||||
if modname not in self.provided_by:
|
||||
# Nothing provides this module, we assume that it
|
||||
# comes from a dependency library somewhere and is
|
||||
# already built by the time this complation starts.
|
||||
# already built by the time this compilation starts.
|
||||
pass
|
||||
else:
|
||||
mods_and_submods_needed.append(modname)
|
||||
|
||||
@@ -8318,7 +8318,7 @@ class NativeFileTests(BasePlatformTests):
|
||||
self.init(testcase, default_args=False,
|
||||
extra_args=['--native-file', os.path.join(testcase, 'nativefile')])
|
||||
|
||||
def test_native_file_dirs_overriden(self):
|
||||
def test_native_file_dirs_overridden(self):
|
||||
testcase = os.path.join(self.unit_test_dir, '60 native file override')
|
||||
self.init(testcase, default_args=False,
|
||||
extra_args=['--native-file', os.path.join(testcase, 'nativefile'),
|
||||
@@ -8724,7 +8724,7 @@ class CrossFileTests(BasePlatformTests):
|
||||
'-Ddef_sharedstatedir=sharedstatebar',
|
||||
'-Ddef_sysconfdir=sysconfbar'])
|
||||
|
||||
def test_cross_file_dirs_overriden(self):
|
||||
def test_cross_file_dirs_overridden(self):
|
||||
testcase = os.path.join(self.unit_test_dir, '60 native file override')
|
||||
self.init(testcase, default_args=False,
|
||||
extra_args=['--native-file', os.path.join(testcase, 'nativefile'),
|
||||
|
||||
@@ -4,8 +4,8 @@ dep = declare_dependency()
|
||||
meson.override_dependency('sub_implicit', dep)
|
||||
meson.override_dependency('sub_implicit_provide1', dep)
|
||||
|
||||
# This one is not overriden but the wrap file tells the variable name to use.
|
||||
# This one is not overridden but the wrap file tells the variable name to use.
|
||||
sub_implicit_provide2_dep = dep
|
||||
|
||||
# This one is not overriden but the wrap file tells the variable name to use.
|
||||
# This one is not overridden but the wrap file tells the variable name to use.
|
||||
glib_dep = dep
|
||||
|
||||
Reference in New Issue
Block a user