summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
authorfriendlyanon <friendlyanon_@hotmail.com>2021-03-24 19:59:14 (GMT)
committerBrad King <brad.king@kitware.com>2021-03-26 13:35:34 (GMT)
commit96a704010713833e9ec17fa78495df3e0852bbf5 (patch)
tree81dcf4a132a5461584c773a2ad34532f5977a3b0 /Help/command
parent3706e9c97cef2ad8097adfd4ed2f04ff08398787 (diff)
downloadCMake-96a704010713833e9ec17fa78495df3e0852bbf5.zip
CMake-96a704010713833e9ec17fa78495df3e0852bbf5.tar.gz
CMake-96a704010713833e9ec17fa78495df3e0852bbf5.tar.bz2
project: Define variables indicating whether project is top level
Define `PROJECT_IS_TOP_LEVEL` and `<PROJECT-NAME>_IS_TOP_LEVEL`. The latter is a STATIC cache entry just like other `<PROJECT-NAME>_*` variables so that it is globally scoped. Issue: #20310 Fixes: #21961
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/project.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Help/command/project.rst b/Help/command/project.rst
index a726cbb..8a6bc1e 100644
--- a/Help/command/project.rst
+++ b/Help/command/project.rst
@@ -28,6 +28,11 @@ Also sets the variables:
:variable:`PROJECT_BINARY_DIR`, :variable:`<PROJECT-NAME>_BINARY_DIR`
Absolute path to the binary directory for the project.
+:variable:`PROJECT_IS_TOP_LEVEL`, :variable:`<PROJECT-NAME>_IS_TOP_LEVEL`
+ .. versionadded:: 3.21
+
+ Boolean value indicating whether the project is top-level.
+
Further variables are set by the optional arguments described in the following.
If any of these arguments is not used, then the corresponding variables are
set to the empty string.