From e855bd5248bbb7b77b45e269e4fa098b29c9e889 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" Date: Thu, 1 Nov 2018 22:26:32 +0100 Subject: Help: Document if(DEFINED ENV{name}) --- Help/command/if.rst | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Help/command/if.rst b/Help/command/if.rst index ea5de7f..1cd9965 100644 --- a/Help/command/if.rst +++ b/Help/command/if.rst @@ -187,10 +187,11 @@ Possible conditions are: ``if( IN_LIST )`` True if the given element is contained in the named list variable. -``if(DEFINED )`` - 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 |ENV{})`` + True if a variable or environment variable + with given ```` 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{}`` or ``$CACHE{}`` -wherever the above-documented condition syntax accepts . +There is no automatic evaluation for environment or cache +:ref:`Variable References`. Their values must be referenced as +``$ENV{}`` or ``$CACHE{}`` wherever the above-documented +condition syntax accepts ````. -- cgit v0.12