diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-12-18 13:42:44 -0800 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-12-19 01:25:17 +0200 |
commit | 05fc81ac3527e66e8460c6a33c84e83c1e84b63c (patch) | |
tree | 884478bff237c85b2a57bee2f6f001ee8f8676e1 /docs/markdown/Reference-manual.md | |
parent | 4ffd009fe930a4996aff22ce23c0fd5dea11ba8b (diff) | |
download | meson-05fc81ac3527e66e8460c6a33c84e83c1e84b63c.zip meson-05fc81ac3527e66e8460c6a33c84e83c1e84b63c.tar.gz meson-05fc81ac3527e66e8460c6a33c84e83c1e84b63c.tar.bz2 |
docs: Add warning about not using join_paths() with build targets [skip ci]
This comes up now and again when people try do do something like:
meson.build:
```meson
my_sources = ['foo.c']
subdir('subdir')
executable('foo', my_sources)
```
subdir/meson.build:
```meson
my_sources += ['bar.c']
```
Diffstat (limited to 'docs/markdown/Reference-manual.md')
-rw-r--r-- | docs/markdown/Reference-manual.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 0625f96..2fc61d5 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -1022,6 +1022,9 @@ Joins the given strings into a file system path segment. For example individual segments is an absolute path, all segments before it are dropped. That means that `join_paths('foo', '/bar')` returns `/bar`. +**Warning** Don't use `join_paths()` for sources in [`library`](#library) and +[`executable`](#executable), you should use [`files`](#files) instead. + *Added 0.36.0* Since 0.49.0 using the`/` operator on strings is equivalent to calling |