docs: Move "build target object" from "build-in objects" to "returned objects"

Also move "run result" object so objects are sorted alphabetically
pull/1823/head
Jon Turney 8 years ago
parent 5ec6151e56
commit 5c7f9797c3
  1. 35
      docs/markdown/Reference-manual.md

@ -737,18 +737,6 @@ When all compilation is 'native', all the methods return the same values as `bui
Note that while cross-compiling, it simply returns the values defined in the cross-info file. If `target_machine` values are not defined in the cross-info file, `host_machine` values are returned instead.
### `build target` object
A build target is either an [executable](#executable), [shared](#shared_library) or [static library](#static_library).
- `extract_objects()` returns an opaque value representing the generated object files of arguments, usually used to take single object files and link them to unit tests or to compile some source files with custom flags. To use the object file(s) in another build target, use the `objects:` keyword argument.
- `extract_all_objects()` is same as above but returns all object files generated by this target
- `private_dir_include()` returns a opaque value that works like `include_directories` but points to the private directory of this target, usually only needed if an another target needs to access some generated internal headers of this target
- `full_path()` returns a full path pointing to the result target file
### `compiler` object
This object is returned by [`meson.get_compiler(lang)`](#meson-object). It represents a compiler for a given language and allows you to query its properties. It has the following methods:
@ -833,14 +821,17 @@ You can also iterate over arrays with the [`foreach` statement](https://github.c
These are objects returned by the [functions listed above](#functions).
### `run result` object
### `build target` object
This object encapsulates the result of trying to compile and run a sample piece of code with [`compiler.run()`](#compiler-object) or [`run_command()`](#run_command). It has the following methods:
A build target is either an [executable](#executable), [shared](#shared_library) or [static library](#static_library).
- `compiled()` if true, the compilation succeeded, if false it did not and the other methods return unspecified data
- `returncode()` the return code of executing the compiled binary
- `stdout()` the standard out produced when the binary was run
- `stderr()` the standard error produced when the binary was run
- `extract_objects()` returns an opaque value representing the generated object files of arguments, usually used to take single object files and link them to unit tests or to compile some source files with custom flags. To use the object file(s) in another build target, use the `objects:` keyword argument.
- `extract_all_objects()` is same as above but returns all object files generated by this target
- `private_dir_include()` returns a opaque value that works like `include_directories` but points to the private directory of this target, usually only needed if an another target needs to access some generated internal headers of this target
- `full_path()` returns a full path pointing to the result target file
### `configuration` data object
@ -906,3 +897,11 @@ This object is returned by [`subproject()`](#subproject) and is an opaque object
subproject. This is useful to, for instance, get a [declared
dependency](#declare_dependency) from the subproject.
### `run result` object
This object encapsulates the result of trying to compile and run a sample piece of code with [`compiler.run()`](#compiler-object) or [`run_command()`](#run_command). It has the following methods:
- `compiled()` if true, the compilation succeeded, if false it did not and the other methods return unspecified data
- `returncode()` the return code of executing the compiled binary
- `stdout()` the standard out produced when the binary was run
- `stderr()` the standard error produced when the binary was run

Loading…
Cancel
Save