浏览代码

Merge topic 'doc-CMAKE_FIND_PACKAGE_NAME'

8435088d Help: Document CMAKE_FIND_PACKAGE_NAME variable
b8abd258 find_package: Document CMAKE_FIND_PACKAGE_NAME variable
Brad King 10 年之前
父节点
当前提交
c9f3e829e7
共有 3 个文件被更改,包括 9 次插入0 次删除
  1. 2 0
      Help/command/find_package.rst
  2. 1 0
      Help/manual/cmake-variables.7.rst
  3. 6 0
      Help/variable/CMAKE_FIND_PACKAGE_NAME.rst

+ 2 - 0
Help/command/find_package.rst

@@ -312,6 +312,8 @@ When loading a find module or package configuration file ``find_package``
 defines variables to provide information about the call arguments (and
 restores their original state before returning):
 
+``CMAKE_FIND_PACKAGE_NAME``
+  the ``<package>`` name which is searched for
 ``<package>_FIND_REQUIRED``
   true if ``REQUIRED`` option was given
 ``<package>_FIND_QUIETLY``

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

@@ -36,6 +36,7 @@ Variables that Provide Information
    /variable/CMAKE_EXECUTABLE_SUFFIX
    /variable/CMAKE_EXTRA_GENERATOR
    /variable/CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES
+   /variable/CMAKE_FIND_PACKAGE_NAME
    /variable/CMAKE_GENERATOR
    /variable/CMAKE_GENERATOR_PLATFORM
    /variable/CMAKE_GENERATOR_TOOLSET

+ 6 - 0
Help/variable/CMAKE_FIND_PACKAGE_NAME.rst

@@ -0,0 +1,6 @@
+CMAKE_FIND_PACKAGE_NAME
+-----------------------
+
+Defined by the :command:`find_package` command while loading
+a find module to record the caller-specified package name.
+See command documentation for details.