qt-build-tools/6.6.0/_tools/cmake/share/cmake-3.27/Help/variable/ENV.rst

14 lines
424 B
ReStructuredText
Raw Normal View History

2023-11-02 05:26:17 +08:00
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.