diff options
author | Brad King <brad.king@kitware.com> | 2018-11-13 15:29:21 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-11-13 15:29:36 (GMT) |
commit | 71e77972c18e1ab905b36782d7b2c2f838957e26 (patch) | |
tree | 3d0f0423191787f1c2db088c504441909f54f2c9 /Help | |
parent | 5e12fad8704e4797ecda3906f3b558775b70539f (diff) | |
parent | 1222f02e343e804f1fcc8ff09e56dc13ac233d98 (diff) | |
download | CMake-71e77972c18e1ab905b36782d7b2c2f838957e26.zip CMake-71e77972c18e1ab905b36782d7b2c2f838957e26.tar.gz CMake-71e77972c18e1ab905b36782d7b2c2f838957e26.tar.bz2 |
Merge topic 'if_support_checking_if_cache_var_defined'
1222f02e34 If: Support the 'DEFINED CACHE{}' syntax
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2561
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/if.rst | 9 | ||||
-rw-r--r-- | Help/release/dev/if-supports-cache-defined.rst | 5 |
2 files changed, 9 insertions, 5 deletions
diff --git a/Help/command/if.rst b/Help/command/if.rst index 1cd9965..a682c83 100644 --- a/Help/command/if.rst +++ b/Help/command/if.rst @@ -187,11 +187,10 @@ Possible conditions are: ``if(<variable|string> IN_LIST <variable>)`` True if the given element is contained in the named list variable. -``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(DEFINED <name>|CACHE{<name>}|ENV{<name>})`` + True if a variable, cache 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 diff --git a/Help/release/dev/if-supports-cache-defined.rst b/Help/release/dev/if-supports-cache-defined.rst new file mode 100644 index 0000000..1e700c0 --- /dev/null +++ b/Help/release/dev/if-supports-cache-defined.rst @@ -0,0 +1,5 @@ +if-supports-cache-defined +------------------------- + +* The :command:`if` command gained support for checking if cache variables + are defined with the ``DEFINED CACHE{VAR}`` syntax. |