diff options
author | Michael Hirsch <scivision@users.noreply.gitlab.kitware.com> | 2022-06-14 00:25:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-06-14 12:06:02 (GMT) |
commit | 75aedb120409c45feb1ff74a765bc94b19d414f6 (patch) | |
tree | 2802aa05509ad9784ecda941ceb958c9b4278ef3 /Help | |
parent | 18687760f49dbffceb191c9a3955156215f86ab8 (diff) | |
download | CMake-75aedb120409c45feb1ff74a765bc94b19d414f6.zip CMake-75aedb120409c45feb1ff74a765bc94b19d414f6.tar.gz CMake-75aedb120409c45feb1ff74a765bc94b19d414f6.tar.bz2 |
Help: Clarify PROJECT_IS_TOP_LEVEL behavior w.r.t. add_subdirectory
Clarify documentation added by commit 2df4badc5f (Help: Note
PROJECT_IS_TOP_LEVEL behavior w.r.t. ExternalProject, 2021-07-05,
v3.21.0-rc3~1^2).
Fixes: #23511
Diffstat (limited to 'Help')
-rw-r--r-- | Help/variable/PROJECT-NAME_IS_TOP_LEVEL.rst | 13 | ||||
-rw-r--r-- | Help/variable/PROJECT_IS_TOP_LEVEL.rst | 13 |
2 files changed, 20 insertions, 6 deletions
diff --git a/Help/variable/PROJECT-NAME_IS_TOP_LEVEL.rst b/Help/variable/PROJECT-NAME_IS_TOP_LEVEL.rst index 6718ecf..ca3a769 100644 --- a/Help/variable/PROJECT-NAME_IS_TOP_LEVEL.rst +++ b/Help/variable/PROJECT-NAME_IS_TOP_LEVEL.rst @@ -13,9 +13,16 @@ the current directory scope or above, see the The variable value will be true in: * the top-level directory of the project -* the top-level directory of an external project added by :module:`ExternalProject` +* the top-level directory of an external project added by + :module:`ExternalProject` +* a directory added by :command:`add_subdirectory` that does not also contain + a :command:`project` call +* a directory added by :command:`FetchContent_MakeAvailable`, + if the fetched content does not contain a :command:`project` call The variable value will be false in: -* a directory added by :command:`add_subdirectory` -* a directory added by :module:`FetchContent` +* a directory added by :command:`add_subdirectory` that also contains + a :command:`project` call +* a directory added by :command:`FetchContent_MakeAvailable`, + if the fetched content contains a :command:`project` call diff --git a/Help/variable/PROJECT_IS_TOP_LEVEL.rst b/Help/variable/PROJECT_IS_TOP_LEVEL.rst index 7e40704..871dfdb 100644 --- a/Help/variable/PROJECT_IS_TOP_LEVEL.rst +++ b/Help/variable/PROJECT_IS_TOP_LEVEL.rst @@ -24,9 +24,16 @@ options: The variable value will be true in: * the top-level directory of the project -* the top-level directory of an external project added by :module:`ExternalProject` +* the top-level directory of an external project added by + :module:`ExternalProject` +* a directory added by :command:`add_subdirectory` that does not also contain + a :command:`project` call +* a directory added by :command:`FetchContent_MakeAvailable`, + if the fetched content does not contain a :command:`project` call The variable value will be false in: -* a directory added by :command:`add_subdirectory` -* a directory added by :module:`FetchContent` +* a directory added by :command:`add_subdirectory` that also contains + a :command:`project` call +* a directory added by :command:`FetchContent_MakeAvailable`, + if the fetched content contains a :command:`project` call |