diff options
author | TheQwertiest <qwertiest@mail.ru> | 2020-05-21 17:05:04 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-06-29 19:54:38 +0300 |
commit | 5696a5abbaaff75279d9c50d431de47f35dc6228 (patch) | |
tree | e5b4dadb1d7bf676ebd46b8bde9c13190bb02269 /docs/markdown/snippets | |
parent | 4d0233540f15c686c199d8f464fc7499a094645e (diff) | |
download | meson-5696a5abbaaff75279d9c50d431de47f35dc6228.zip meson-5696a5abbaaff75279d9c50d431de47f35dc6228.tar.gz meson-5696a5abbaaff75279d9c50d431de47f35dc6228.tar.bz2 |
Added ability to specify target in `meson compile`
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r-- | docs/markdown/snippets/add_meson_compile_target.md | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/markdown/snippets/add_meson_compile_target.md b/docs/markdown/snippets/add_meson_compile_target.md new file mode 100644 index 0000000..d75862f --- /dev/null +++ b/docs/markdown/snippets/add_meson_compile_target.md @@ -0,0 +1,19 @@ +## Added ability to specify targets in `meson compile` + +It's now possible to specify targets in `meson compile`, which will result in building only the requested targets. + +Usage: `meson compile [TARGET [TARGET...]]` +`TARGET` has the following syntax: `[PATH/]NAME[:TYPE]`. +`NAME`: name of the target from `meson.build` (e.g. `foo` from `executable('foo', ...)`). +`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`. + +For example targets from the following code: +```meson +shared_library('foo', ...) +static_library('foo', ...) +executable('bar', ...) +``` +can be invoked with `meson compile foo:shared_library foo:static_library bar`. |