浏览代码

Help: Document which variable names CMake reserves.

Robert Maynard 5 年之前
父节点
当前提交
2158ef3e44
共有 3 个文件被更改,包括 10 次插入0 次删除
  1. 7 0
      Help/manual/ID_RESERVE.txt
  2. 2 0
      Help/manual/cmake-language.7.rst
  3. 1 0
      Help/manual/cmake-variables.7.rst

+ 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
 ==================================