summaryrefslogtreecommitdiff
path: root/Help/variable/ENV.rst
blob: 6791853bb632bd09c82c432b2400685544a55c3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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.

For general information on environment variables, see the
:ref:`Environment Variables <CMake Language Environment Variables>`
section in the :manual:`cmake-language(7)` manual.