Browse Source

Help: Document which variable names CMake reserves.

Robert Maynard 5 years ago
parent
commit
2158ef3e44

+ 7 - 0
Help/manual/ID_RESERVE.txt

@@ -0,0 +1,7 @@
+.. note::
+
+  CMake reserves identifiers that:
+
+  * begin with ``CMAKE_`` (upper-, lower-, or mixed-case), or
+  * begin with ``_CMAKE_`` (upper-, lower-, or mixed-case), or
+  * begin with ``_`` followed by the name of any :manual:`CMake Command <cmake-commands(7)>`.

+ 2 - 0
Help/manual/cmake-language.7.rst

@@ -567,6 +567,8 @@ The :manual:`cmake-variables(7)` manual documents the many variables
 that are provided by CMake or have meaning to CMake when set
 by project code.
 
+.. include:: ID_RESERVE.txt
+
 .. _`CMake Language Environment Variables`:
 
 Environment Variables

+ 1 - 0
Help/manual/cmake-variables.7.rst

@@ -14,6 +14,7 @@ For general information on variables, see the
 :ref:`Variables <CMake Language Variables>`
 section in the cmake-language manual.
 
+.. include:: ID_RESERVE.txt
 
 Variables that Provide Information
 ==================================