cmake: rebase fixes

pull/4969/head
Daniel Mensinger 6 years ago
parent 9b22147dcb
commit 35936316eb
No known key found for this signature in database
GPG Key ID: 54DD94C131E277D4
  1. 8
      docs/markdown/Reference-manual.md
  2. 5
      mesonbuild/cmake/interpreter.py
  3. 6
      mesonbuild/interpreter.py

@ -1082,7 +1082,7 @@ res2 = foo / bar
```
Builds a library that is either static, shared or both depending on
the value of `default_library`
the value of `default_library`
user [option](https://mesonbuild.com/Builtin-options.html).
You should use this instead of [`shared_library`](#shared_library),
[`static_library`](#static_library) or
@ -1405,11 +1405,11 @@ arguments:
- `version` keyword argument that works just like the one in
`dependency`. It specifies what version the subproject should be,
as an example `>=1.0.1`
- `method` *(added 0.50.0)* Specifies the configuration method of the
- `method` *(added 0.51.0)* Specifies the configuration method of the
subproject. Possible values are `meson`, `cmake` and `auto`. With
`auto` meson will always prefer a `meson.build` in the subproject
over other methods. The default value of `method` is `auto`.
- `cmake_options` *(added 0.50.0)* List of additional CMake options
- `cmake_options` *(added 0.51.0)* List of additional CMake options
- `required` *(added 0.48.0)* By default, `required` is `true` and
Meson will abort if the subproject could not be setup. You can set
this to `false` and then use the `.found()` method on the [returned
@ -2180,7 +2180,7 @@ an external dependency with the following methods:
dep3 will add `['-Werror=foo', '-Werror=bar']` to the compiler args
of any target it is added to, but libfoo will not be added to the
link_args.
*Note*: A bug present until 0.50.1 results in the above behavior
not working correctly.

@ -34,6 +34,7 @@ backend_generator_map = {
'vs2010': 'Visual Studio 10 2010',
'vs2015': 'Visual Studio 15 2017',
'vs2017': 'Visual Studio 15 2017',
'vs2019': 'Visual Studio 16 2019',
}
language_map = {
@ -430,7 +431,7 @@ class CMakeInterpreter:
if not isinstance(elements, list):
elements = [args]
args.arguments += [nodeify(x) for x in elements]
return ArrayNode(args, 0, 0)
return ArrayNode(args, 0, 0, 0, 0)
def function(name: str, args=[], kwargs={}) -> FunctionNode:
args_n = ArgumentNode(token())
@ -438,7 +439,7 @@ class CMakeInterpreter:
args = [args]
args_n.arguments = [nodeify(x) for x in args]
args_n.kwargs = {k: nodeify(v) for k, v in kwargs.items()}
func_n = FunctionNode(self.subdir, 0, 0, name, args_n)
func_n = FunctionNode(self.subdir, 0, 0, 0, 0, name, args_n)
return func_n
def method(obj: BaseNode, name: str, args=[], kwargs={}) -> MethodNode:

@ -2416,7 +2416,7 @@ external dependencies (including libraries) must go to "dependencies".''')
raise InterpreterException('Tried to call option() in build description file. All options must be in the option file.')
@FeatureNewKwargs('subproject', '0.38.0', ['default_options'])
@FeatureNewKwargs('subproject', '0.50.0', ['method'])
@FeatureNewKwargs('subproject', '0.51.0', ['method', 'cmake_options'])
@permittedKwargs(permitted_kwargs['subproject'])
@stringArgs
def func_subproject(self, nodes, args, kwargs):
@ -2537,9 +2537,9 @@ external dependencies (including libraries) must go to "dependencies".''')
self.subprojects[dirname] = SubprojectHolder(subi, self.subproject_dir, dirname)
# Duplicates are possible when subproject uses files from project root
if build_def_files:
self.build_def_files += list(set(self.build_def_files + build_def_files))
self.build_def_files = list(set(self.build_def_files + build_def_files))
else:
self.build_def_files += list(set(self.build_def_files + subi.build_def_files))
self.build_def_files = list(set(self.build_def_files + subi.build_def_files))
self.build.merge(subi.build)
self.build.subprojects[dirname] = subi.project_version
return self.subprojects[dirname]

Loading…
Cancel
Save