https://github.com/Kitware/CMake
Raw File
Tip revision: d566bd962df5b1bf0ec5d16e9e7affe592b8b3eb authored by Brad King on 28 July 2022, 15:46:12 UTC
CMake 3.23.3
Tip revision: d566bd9
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