mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-26 10:48:38 -06:00
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
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user