https://github.com/Kitware/CMake
Raw File
Tip revision: 0aae790a5edc2f8cc7501f61c011409c55d32d89 authored by Brad King on 23 June 2021, 13:01:47 UTC
CMake 3.21.0-rc1
Tip revision: 0aae790
ENV.rst
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.
back to top