Help: State valid scopes for using proj_SOURCE_DIR and proj_BINARY_DIR

Fixes: #25714
This commit is contained in:
Craig Scott
2024-08-17 16:11:22 +10:00
parent 2904ce00d2
commit 13bf4dc9ef

View File

@@ -33,10 +33,17 @@ Also sets the variables:
Boolean value indicating whether the project is top-level. Boolean value indicating whether the project is top-level.
Further variables are set by the optional arguments described in the following. Further variables are set by the optional arguments described in `Options`_
If any of these arguments is not used, then the corresponding variables are further below. Where an option is not given, its corresponding variable is
set to the empty string. set to the empty string.
Note that variables of the form ``<name>_SOURCE_DIR`` and ``<name>_BINARY_DIR``
may also be set by other commands before ``project()`` is called (see the
:command:`FetchContent_MakeAvailable` command for one example).
Projects should not rely on ``<PROJECT-NAME>_SOURCE_DIR`` or
``<PROJECT-NAME>_BINARY_DIR`` holding a particular value outside of the scope
of the call to ``project()`` or one of its child scopes.
Options Options
^^^^^^^ ^^^^^^^