summaryrefslogtreecommitdiffstats
path: root/Help/manual
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2018-08-07 12:43:22 (GMT)
committerBrad King <brad.king@kitware.com>2018-08-07 17:13:27 (GMT)
commit4d384d290e2c873ad1f8d749e54b1b097df727dd (patch)
tree4bbbb047919fdc60923d5f4131139a67dab199b5 /Help/manual
parent90df5f673029ae5a9ca1e88fec9ed3aa67ad36d1 (diff)
downloadCMake-4d384d290e2c873ad1f8d749e54b1b097df727dd.zip
CMake-4d384d290e2c873ad1f8d749e54b1b097df727dd.tar.gz
CMake-4d384d290e2c873ad1f8d749e54b1b097df727dd.tar.bz2
Help: Document the $CACHE{} syntax
Also add a test case for the behavior.
Diffstat (limited to 'Help/manual')
-rw-r--r--Help/manual/cmake-language.7.rst7
-rw-r--r--Help/manual/cmake-variables.7.rst1
2 files changed, 8 insertions, 0 deletions
diff --git a/Help/manual/cmake-language.7.rst b/Help/manual/cmake-language.7.rst
index 87f8f9d..591f73d 100644
--- a/Help/manual/cmake-language.7.rst
+++ b/Help/manual/cmake-language.7.rst
@@ -399,6 +399,11 @@ and how their values are set.
An *environment variable reference* has the form ``$ENV{VAR}`` and
is evaluated in the same contexts as a normal variable reference.
+See :variable:`ENV` for more information.
+
+A *cache variable reference* has the form ``$CACHE{VAR}`` and
+is evaluated in the same contexts as a normal variable reference.
+See :variable:`CACHE` for more information.
Comments
--------
@@ -543,6 +548,8 @@ to the binding in the current directory scope, if any. If a
is found, or no binding is found, CMake then searches for a
cache entry. If a cache entry is found, its value is used.
Otherwise, the variable reference evaluates to an empty string.
+The ``$CACHE{VAR}`` syntax can be used to do direct cache entry
+lookups.
The :manual:`cmake-variables(7)` manual documents many variables
that are provided by CMake or have meaning to CMake when set
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 5a3cd81..4ddbfe5 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -230,6 +230,7 @@ Variables that Describe the System
/variable/ANDROID
/variable/APPLE
/variable/BORLAND
+ /variable/CACHE
/variable/CMAKE_CL_64
/variable/CMAKE_COMPILER_2005
/variable/CMAKE_HOST_APPLE