https://github.com/Kitware/CMake
Raw File
Tip revision: 4c82f309c59d02899145bc25c0e9efc91a6f64ed authored by Brad King on 10 April 2020, 11:37:32 UTC
CMake 3.16.6
Tip revision: 4c82f30
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