summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-07-08 13:44:02 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-07-08 13:44:08 (GMT)
commit755f5194c603a6d096735e2dc2939f728d8a3f59 (patch)
treebd71b7ad261b139a9465916d33904fa0762c4128 /Help
parentb49329be3bf31916cfb83c0dc0068d583f38c24d (diff)
parent2df4badc5f5902ae6808cb3c4b0c3c8484686b5d (diff)
downloadCMake-755f5194c603a6d096735e2dc2939f728d8a3f59.zip
CMake-755f5194c603a6d096735e2dc2939f728d8a3f59.tar.gz
CMake-755f5194c603a6d096735e2dc2939f728d8a3f59.tar.bz2
Merge topic 'help_toplevel'
2df4badc5f Help: Note PROJECT_IS_TOP_LEVEL behavior w.r.t. ExternalProject Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6307
Diffstat (limited to 'Help')
-rw-r--r--Help/variable/PROJECT-NAME_IS_TOP_LEVEL.rst10
-rw-r--r--Help/variable/PROJECT_IS_TOP_LEVEL.rst10
2 files changed, 20 insertions, 0 deletions
diff --git a/Help/variable/PROJECT-NAME_IS_TOP_LEVEL.rst b/Help/variable/PROJECT-NAME_IS_TOP_LEVEL.rst
index 953e978..6718ecf 100644
--- a/Help/variable/PROJECT-NAME_IS_TOP_LEVEL.rst
+++ b/Help/variable/PROJECT-NAME_IS_TOP_LEVEL.rst
@@ -9,3 +9,13 @@ level ``CMakeLists.txt`` file.
To obtain the value from the most recent call to :command:`project` in
the current directory scope or above, see the
:variable:`PROJECT_IS_TOP_LEVEL` variable.
+
+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 variable value will be false in:
+
+* a directory added by :command:`add_subdirectory`
+* a directory added by :module:`FetchContent`
diff --git a/Help/variable/PROJECT_IS_TOP_LEVEL.rst b/Help/variable/PROJECT_IS_TOP_LEVEL.rst
index e5eb6c1..ad61fec 100644
--- a/Help/variable/PROJECT_IS_TOP_LEVEL.rst
+++ b/Help/variable/PROJECT_IS_TOP_LEVEL.rst
@@ -19,3 +19,13 @@ options:
if(PROJECT_IS_TOP_LEVEL)
include(CTest)
endif()
+
+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 variable value will be false in:
+
+* a directory added by :command:`add_subdirectory`
+* a directory added by :module:`FetchContent`