mirror of
https://github.com/reactos/CMake.git
synced 2025-02-12 14:58:45 +00:00
Help: Document if(DEFINED ENV{name})
This commit is contained in:
parent
8ba2a8d4a4
commit
e855bd5248
@ -187,10 +187,11 @@ Possible conditions are:
|
||||
``if(<variable|string> IN_LIST <variable>)``
|
||||
True if the given element is contained in the named list variable.
|
||||
|
||||
``if(DEFINED <variable>)``
|
||||
True if the given variable is defined. It does not matter if the
|
||||
variable is true or false just if it has been set. (Note macro
|
||||
arguments are not variables.)
|
||||
``if(DEFINED <name>|ENV{<name>})``
|
||||
True if a variable or environment variable
|
||||
with given ``<name>`` is defined.
|
||||
The value of the variable does not matter.
|
||||
Note that macro arguments are not variables.
|
||||
|
||||
``if((condition) AND (condition OR (condition)))``
|
||||
The conditions inside the parenthesis are evaluated first and then
|
||||
@ -270,6 +271,7 @@ A quoted or bracketed variable or keyword will be interpreted as a
|
||||
string and not dereferenced or interpreted.
|
||||
See policy :policy:`CMP0054`.
|
||||
|
||||
There is no short form for environment or cache :ref:`Variable References`.
|
||||
They can be referenced as ``$ENV{<name>}`` or ``$CACHE{<name>}``
|
||||
wherever the above-documented condition syntax accepts <variable|string>.
|
||||
There is no automatic evaluation for environment or cache
|
||||
:ref:`Variable References`. Their values must be referenced as
|
||||
``$ENV{<name>}`` or ``$CACHE{<name>}`` wherever the above-documented
|
||||
condition syntax accepts ``<variable|string>``.
|
||||
|
Loading…
x
Reference in New Issue
Block a user