diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-04-19 10:34:00 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-06-06 18:27:04 +0200 |
commit | 35936316eb87f2930a3873da71eaa1c9f11e3186 (patch) | |
tree | 4d47ec683062592784fa1cbc32ad6d127b0d4456 | |
parent | 9b22147dcb0c31cc374ebf6b059f225530401a51 (diff) | |
download | meson-35936316eb87f2930a3873da71eaa1c9f11e3186.zip meson-35936316eb87f2930a3873da71eaa1c9f11e3186.tar.gz meson-35936316eb87f2930a3873da71eaa1c9f11e3186.tar.bz2 |
cmake: rebase fixes
-rw-r--r-- | docs/markdown/Reference-manual.md | 8 | ||||
-rw-r--r-- | mesonbuild/cmake/interpreter.py | 5 | ||||
-rw-r--r-- | mesonbuild/interpreter.py | 6 |
3 files changed, 10 insertions, 9 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 5662708..68c8f9d 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -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. diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py index da14a06..488c99c 100644 --- a/mesonbuild/cmake/interpreter.py +++ b/mesonbuild/cmake/interpreter.py @@ -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: diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index efed755..0e50202 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -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] |