aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-09-29 19:24:25 +0300
committerGitHub <noreply@github.com>2020-09-29 19:24:25 +0300
commit5f70984403e48e72e22991882ac6ffa03d6ce18e (patch)
treef6a290c0afb15e572193b1e05a1268c20a1c89fb /docs/markdown/snippets
parentff186b05261210602490ea4764e5ccfa2ec494fc (diff)
parent7176b74fd60fb4726826c46c545c2ed25c26cd20 (diff)
downloadmeson-5f70984403e48e72e22991882ac6ffa03d6ce18e.zip
meson-5f70984403e48e72e22991882ac6ffa03d6ce18e.tar.gz
meson-5f70984403e48e72e22991882ac6ffa03d6ce18e.tar.bz2
Merge pull request #7772 from xclaesse/deprecate-source-root
Deprecate meson.build_root() and meson.source_root()
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/deprecate_source_build_root.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/markdown/snippets/deprecate_source_build_root.md b/docs/markdown/snippets/deprecate_source_build_root.md
new file mode 100644
index 0000000..1cebef4
--- /dev/null
+++ b/docs/markdown/snippets/deprecate_source_build_root.md
@@ -0,0 +1,10 @@
+## `meson.build_root()` and `meson.source_root()` are deprecated
+
+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.
+
+`meson.current_source_dir()` and `meson.current_build_dir()` should be used instead
+and have been available in all Meson versions. New functions `meson.project_source_root()`
+and `meson.project_build_root()` have been added in Meson 0.56.0 to get the root
+of the current (sub)project.