mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 15:18:26 -05:00
Help: Describe $CACHE and $ENV as operators
This resolves issue #18514 Also add a cross-reference to if(DEFINED ENV{var}).
This commit is contained in:
committed by
Joachim Wuttke (h)
parent
e855bd5248
commit
860338491e
@@ -1,7 +1,7 @@
|
||||
CACHE
|
||||
-----
|
||||
|
||||
Read cache variables.
|
||||
Operator to read cache variables.
|
||||
|
||||
Use the syntax ``$CACHE{VAR}`` to read cache entry ``VAR``.
|
||||
See the :ref:`cmake-language(7) variables <CMake Language Variables>`
|
||||
@@ -14,4 +14,5 @@ found CMake will search for a cache entry with that name.
|
||||
The ``$CACHE{VAR}`` syntax can be used to do direct cache lookup and
|
||||
ignore any existing normal variable.
|
||||
|
||||
See the :command:`set` command to see how to write cache variables.
|
||||
See the :command:`set` and :command:`unset` commands to see how to
|
||||
write or remove cache variables.
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
ENV
|
||||
---
|
||||
|
||||
Read environment variables.
|
||||
Operator to read environment variables.
|
||||
|
||||
Use the syntax ``$ENV{VAR}`` to read environment variable ``VAR``.
|
||||
|
||||
See the :command:`set` command to see how to write environment variables.
|
||||
To test whether an environment variable is defined, use the signature
|
||||
``if(DEFINED ENV{<name>})`` of the :command:`if` command.
|
||||
|
||||
See the :command:`set` and :command:`unset` commands to see how to
|
||||
write or remove environment variables.
|
||||
|
||||
Reference in New Issue
Block a user