mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00

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
12 lines
349 B
ReStructuredText
12 lines
349 B
ReStructuredText
<PROJECT-NAME>_IS_TOP_LEVEL
|
|
---------------------------
|
|
|
|
.. versionadded:: 3.21
|
|
|
|
A boolean variable indicating whether the named project was called in a top
|
|
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.
|