diff options
| author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-04-09 08:46:01 -0400 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2021-04-09 09:29:12 -0700 |
| commit | 5440ce003b5ffad9220496df910a52fb9d798a91 (patch) | |
| tree | f61c94809ffafa9cbab0a1d9ccf258c28d1c0ae6 /docs/markdown/Reference-manual.md | |
| parent | f328632fa500aaa085b63712414bdd1b890aaf0b (diff) | |
| download | meson-5440ce003b5ffad9220496df910a52fb9d798a91.tar.gz | |
Add global_source/build_root()
Diffstat (limited to 'docs/markdown/Reference-manual.md')
| -rw-r--r-- | docs/markdown/Reference-manual.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 74f332438..e4c470306 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -1989,6 +1989,9 @@ the following methods. root directory. *(deprecated since 0.56.0)*: this function will return the build root of the parent project if called from a subproject, which is usually not what you want. Try using `current_build_dir()` or `project_build_root()`. + In the rare cases where the root of the main project is needed, + use `global_build_root()` that has the same behaviour but with a more explicit + name. - `source_root()`: returns a string with the absolute path to the source root directory. Note: you should use the `files()` function @@ -1997,6 +2000,9 @@ the following methods. *(deprecated since 0.56.0)*: This function will return the source root of the parent project if called from a subproject, which is usually not what you want. Try using `current_source_dir()` or `project_source_root()`. + In the rare cases where the root of the main project is needed, + use `global_source_root()` that has the same behaviour but with a more explicit + name. - `project_build_root()` *(since 0.56.0)*: returns a string with the absolute path to the build root directory of the current (sub)project. @@ -2004,6 +2010,16 @@ the following methods. - `project_source_root()` *(since 0.56.0)*: returns a string with the absolute path to the source root directory of the current (sub)project. +- `global_build_root()` *(since 0.58.0)*: returns a string with the absolute path + to the build root directory. This function will return the build root of the + main project if called from a subproject, which is usually not what you want. + It is usually preferable to use `current_build_dir()` or `project_build_root()`. + +- `global_source_root()` *(since 0.58.0)*: returns a string with the absolute path + to the source root directory. This function will return the source root of the + main project if called from a subproject, which is usually not what you want. + It is usually preferable to use `current_source_dir()` or `project_source_root()`. + - `current_build_dir()`: returns a string with the absolute path to the current build directory. |
