summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-06-14 16:07:14 +0000
committerKitware Robot <kwrobot@kitware.com>2022-06-14 12:09:01 -0400
commita26ab5cff431b61e43159b1898728f2e7273034c (patch)
tree71a2850a2416b152ed1d05aa937b0b0633a19630
parentca00b751d2d3686cf9e0daa7f857ac5beb825e54 (diff)
parent75aedb120409c45feb1ff74a765bc94b19d414f6 (diff)
downloadcmake-a26ab5cff431b61e43159b1898728f2e7273034c.tar.gz
Merge topic 'doctop' into release-3.24
75aedb1204 Help: Clarify PROJECT_IS_TOP_LEVEL behavior w.r.t. add_subdirectory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7362
-rw-r--r--Help/variable/PROJECT-NAME_IS_TOP_LEVEL.rst13
-rw-r--r--Help/variable/PROJECT_IS_TOP_LEVEL.rst13
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 6718ecfd95..ca3a76988a 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 7e407045a5..871dfdbd66 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