aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Reference-manual.md
AgeCommit message (Collapse)AuthorFilesLines
2020-11-12interpreter: Add get_keys function for configuration_data (#7887)Jones1-0/+6
2020-11-05docs: Recommend to use SPDX license identifiers [skip ci]Michael Weiss1-7/+8
Some license identifiers are ambiguous (e.g. "GPL3"). The SPDX license identifiers avoid this by providing standardized and unique identifiers (e.g. "GPL-3.0-only" or "GPL-3.0-or-later" for the previous example). Because SPDX short-form identifiers are also both human- and machine-readable we should recommend them in the documentation. More information (advantages, details, etc.) can be found here: - https://spdx.dev/resources/use/#identifiers - https://spdx.dev/ids/ Fix #7905.
2020-10-19fix markdown issuePaolo Bonzini1-1/+1
2020-10-16Fix consistency in variables kwargXavier Claessens1-1/+1
Share common code to extract the `variables` kwarg in declare_dependency() and pkg.generate().
2020-10-08dependency: support boolean argument "allow_fallback"Paolo Bonzini1-4/+13
Sometimes, distros want to configure a project so that it does not use any bundled library. In this case, meson.build might want to do something like this, where slirp is a combo option with values auto/system/internal: slirp = dependency('', required: false) if get_option('slirp') != 'internal' slirp = dependency('slirp', required: get_option('slirp') == 'system') endif if not slirp.found() slirp = subproject('libslirp', ...) .variable('...') endif and we cannot use "fallback" because the "system" value should never look for a subproject. This worked until 0.54.x, but in 0.55.x this breaks because of the automatic subproject search. Note that the desired effect here is backwards compared to the policy of doing an automatic search on "required: true"; we only want to do the search if "required" is false! It would be possible to look for the dependency with `required: false` and issue the error manually, but it's ugly and it may produce an error message that looks "different" from Meson's. Instead, with this change it is possible to achieve this effect in an even simpler way: slirp = dependency('slirp', required: get_option('slirp') != 'auto', allow_fallback: get_option('slirp') == 'system' ? false : ['slirp', 'libslirp_dep']) The patch also adds support for "allow_fallback: true", which is simple and enables automatic fallback to a wrap even for non-required dependencies.
2020-10-08docs: improve documentation of subproject fallbackPaolo Bonzini1-15/+34
Automatic fallback to subprojects is complicated and should be pointed out outside the "fallback" keyword argument. It is also surprising that fallback to a subproject will not happen if override_dependency has already been used with the request dependency. Document all this.
2020-10-07Add win_subsystem kwarg. Closes #7765.Jussi Pakkanen1-2/+9
2020-10-02docs: Fixup find_program search path documentation [skip ci]Nirbheek Chauhan1-5/+16
It was slightly wrong, and also make it a bullet point for easier parsing.
2020-10-01deprecated get_configtool_variable and get_pkgconfig_variableDylan Baker1-10/+14
The get_variable method is able to do everything they do and more, making it generally more useful. Let's tell people to stop using the old ones.
2020-10-01Document search order of find_programRasmus Thomsen1-1/+4
2020-10-01document keys() method of dictionary object [skip ci]Alexandros Theodotou1-0/+2
2020-09-29Merge pull request #7772 from xclaesse/deprecate-source-rootJussi Pakkanen1-7/+13
Deprecate meson.build_root() and meson.source_root()
2020-09-29Improve documentation about using shell in custom_target() [skip ci]Jon Turney1-0/+4
Add a note about the portability of using shell constructs in the custom_target() command.
2020-09-28Add meson.project_build/source_root() methodsXavier Claessens1-2/+8
2020-09-23Deprecate meson.build_root() and meson.source_root()Xavier Claessens1-6/+6
Those function are common source of issue when used in a subproject because they point to the parent project root which is rarely what is expected and is a violation of subproject isolation.
2020-09-14InternalDependency: Add as_link_whole() methodXavier Claessens1-0/+7
2020-09-10Don't require build machine compilers for project() languagesJon Turney1-5/+13
This means that, in the common case of a simple meson.build which doesn't contain any 'native: true' targets, we won't require a native compiler when cross-compiling, without needing any changes in the meson.build.
2020-09-06doc: Add missing method arguments [skip ci]Michal Sojka1-21/+21
Documentation of most methods mentions method arguments enclosed in parentheses. Two methods are an exception and we fix them here to make the manual more consistent.
2020-09-05docs: Fix typo in Reference-manual.md [skip ci]Krzysztof MaƂysa1-1/+1
2020-08-15Add that prefix keyword works for cc.get_defineJohn Scott1-1/+1
2020-07-20string: add substring methodStéphane Cerveau1-0/+3
This method aims to offer a simple way to 'substring' an existing string with start and end values.
2020-07-09doc: Small tweaks to fallback documentation [skip ci]Xavier Claessens1-0/+2
2020-07-01wrap: Add 'provide' sectionXavier Claessens1-1/+3
2020-07-01Implicit dependency fallback when a subproject wrap or dir existsXavier Claessens1-1/+3
2020-06-30Cleaned up Reference docs [skip ci]TheQwertiest1-486/+470
2020-06-11Correct argument typo in partial_dependnecy (#7300) [skip ci]Phillip Johnston1-1/+1
Should be "sources" not "source" ``` ../meson.build:162: WARNING: Passed invalid keyword argument "source". WARNING: This will become a hard error in the future. Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/mesonbuild/mesonmain.py", line 131, in run return options.run_func(options) File "/usr/local/lib/python3.7/site-packages/mesonbuild/msetup.py", line 245, in run app.generate() File "/usr/local/lib/python3.7/site-packages/mesonbuild/msetup.py", line 159, in generate self._generate(env) File "/usr/local/lib/python3.7/site-packages/mesonbuild/msetup.py", line 192, in _generate intr.run() File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreter.py", line 4359, in run super().run() File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 465, in run self.evaluate_codeblock(self.ast, start=1) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 490, in evaluate_codeblock raise e File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 483, in evaluate_codeblock self.evaluate_statement(cur) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 498, in evaluate_statement self.assignment(cur) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 1151, in assignment value = self.evaluate_statement(node.value) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 500, in evaluate_statement return self.method_call(cur) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 895, in method_call return obj.method_call(method_name, args, self.kwargs_string_keys(kwargs)) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 39, in method_call return method(args, kwargs) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 285, in wrapped return f(*wrapped_args, **wrapped_kwargs) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 151, in wrapped return f(*wrapped_args, **wrapped_kwargs) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreterbase.py", line 213, in wrapped return f(*wrapped_args, **wrapped_kwargs) File "/usr/local/lib/python3.7/site-packages/mesonbuild/interpreter.py", line 484, in partial_dependency_method pdep = self.held_object.get_partial_dependency(**kwargs) TypeError: get_partial_dependency() got an unexpected keyword argument 'source' FAILED: build.ninja ```
2020-05-18pass exe_wrapper to test scripts through the environmentDylan Baker1-0/+7
This adds a new MESON_EXE_WRAPPER environment variable containing the string form of the exe_wrapper, if there is an exe_wrapper defined. Fixes #4427
2020-05-14interpreter: Rename has_exe_wrapper -> can_run_host_binariesDylan Baker1-4/+8
The implementation of this function has changed enough that the name doesn't really reflect what it actually does. It basically returns true unless you're cross compiling, need and exe_wrapper, and don't have one. The original function remains but is marked as deprecated. This makes one small change the meson source language, which is that it defines that can_run_host_binaries will return true in build == host compilation, which was the behavior that already existed. Previously this was undefined in build == host compilation.
2020-05-06Merge pull request #7064 from dcbaker/gtest-protocolJussi Pakkanen1-5/+8
Add support for Gtest as a test protocol
2020-05-04Add native support for gtest testsDylan Baker1-5/+8
Gtest can output junit results with a command line switch. We can parse this to get more detailed results than the returncode, and put those in our own Junit output. We basically just throw away the top level 'testsuites' object, then fixup the names of the tests, and shove that into our junit.
2020-05-03Merge pull request #7060 from dcbaker/install-script-targetsJussi Pakkanen1-0/+7
Allow meson.add_*_script to take additional types
2020-04-30Docs: Update link_language docs to explain when it should be usedDylan Baker1-2/+6
2020-04-30docs: Update documentation for add_*_scriptDylan Baker1-0/+7
2020-04-28find_program: Fixes when the program has been overridden by executableXavier Claessens1-1/+9
- ExternalProgramHolder has path() method while CustomTargetHolder and BuildTargetHolder have full_path(). - The returned ExternalProgramHolder's path() method was broken, because build.Executable object has no get_path() method, it needs the backend. - find_program('overridden_prog', version : '>=1.0') was broken because it needs to execute the exe that is not yet built. Now assume the program has the (sub)project version. - If the version check fails, interpreter uses ExternalProgramHolder.get_name() for the error message but build.Executable does not implement get_name() method.
2020-04-12Merge pull request #6958 from jon-turney/fix-name-prefix-explicit-defaultJussi Pakkanen1-4/+4
Fix library(name_prefix: [])
2020-04-11docs: fix the docs for install_subdir's strip_directory [skip ci]Peter Hutterer1-1/+1
When set to **true** only the last component is used. And throw in two minor grammatical fixes while we're there.
2020-04-11Refine documentation of default name_prefixJon Turney1-4/+4
Refine documentation of the default name_prefix, so people don't get the impression they can write logic which uses 'lib' as the default, when they should be defaulting to '[]', to let us take care of the complexities.
2020-03-28docs: why 'ninja test' depends on build_by_default targets [skip ci]Marc Herbert1-2/+6
Fixes #1949
2020-03-19cmake: Add find_package COMPONETS supportDaniel Mensinger1-1/+2
2020-03-09Merge pull request #6532 from jon-turney/languages-native-kwargJussi Pakkanen1-9/+19
Add add_languages(native:)
2020-03-06Improve logged messages for overriden dependenciesXavier Claessens1-1/+4
2020-03-06Simplify dependency() fallbackXavier Claessens1-0/+4
Now that subprojects can override the dependency name, there is no need to provide a variable name for the fallback any more.
2020-03-06Add meson.override_dependency()Xavier Claessens1-1/+7
Similar to meson.override_find_program() but overrides the result of the dependency() function. Also ensure that dependency() always returns the same result when looking for the same dependency, this fixes cases where parts of the project could be using a system library and other parts use the library provided by a subproject.
2020-03-04interpreter: add 'name' method to BuildTargetHolderStéphane Cerveau1-0/+2
As any child of BuildTargetHolder might need the name of the object, provides a method to get object name. This is useful in gst-build to display the plugin name and not the filename.
2020-02-26summary: Add list_sep keyword argumentXavier Claessens1-1/+2
This allows having lists on a single line instead of having each value aligned on a new line.
2020-02-19docs: Improve visibility for `.enabled()` etc., add example [skip ci]Niklas HambĂŒchen1-2/+14
2020-02-18docs: Mention `cuda` as supported language [skip ci]Niklas HambĂŒchen1-1/+1
2020-02-18docs: Fix typo 'serie' -> 'series'Niklas HambĂŒchen1-1/+1
2020-02-17minstall: Add a new option --quietNirbheek Chauhan1-2/+5
This is a significant speed-up on Windows because terminals are slow to print things out. Speed-up in gst-build on Windows: ``` meson install: before: 5.1 seconds after: 4.0 seconds ```
2020-02-12Refine behaviour of add_languages() when native: is missingJon Turney1-3/+7
This improves the common case of a simple meson.build which doesn't contain any 'native: true' targets to not require a native compiler when cross-compiling, without needing any changes in the meson.build. v2: Do it the right way around!