CMake/Help/variable/ENV.rst
Joachim Wuttke (l) 860338491e Help: Describe $CACHE and $ENV as operators
This resolves issue #18514

Also add a cross-reference to if(DEFINED ENV{var}).
2018-11-08 20:33:13 +01:00

13 lines
353 B
ReStructuredText

ENV
---
Operator to read environment variables.
Use the syntax ``$ENV{VAR}`` to read environment variable ``VAR``.
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.