Sfoglia il codice sorgente

[docs] In the CMake primer, correct the description of the ARGV/ARGN variables.

ARGN is the sublist of unnamed arguments, not the count of the arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311632 91177308-0d34-0410-b5e6-96231b3b80d8
Lang Hames 8 anni fa
parent
commit
5a19c2915c
1 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 5 5
      docs/CMakePrimer.rst

+ 5 - 5
docs/CMakePrimer.rst

@@ -336,15 +336,15 @@ to the ``macro`` block as well.
 CMake commands can have named arguments that are requried at every call site. In
 CMake commands can have named arguments that are requried at every call site. In
 addition, all commands will implicitly accept a variable number of extra
 addition, all commands will implicitly accept a variable number of extra
 arguments (In C parlance, all commands are varargs functions). When a command is
 arguments (In C parlance, all commands are varargs functions). When a command is
-invoked with extra arguments (beyond the named ones) CMake will store the extra
-arguments in a list named ``ARGV``, and the count of the extra arguments in
-``ARGN``. Below is a trivial example of providing a wrapper function for CMake's
-built in function ``add_dependencies``.
+invoked with extra arguments (beyond the named ones) CMake will store the full
+list of arguments (both named and unnamed) in a list named ``ARGV``, and the
+sublist of unnamed arguments in ``ARGN``. Below is a trivial example of
+providing a wrapper function for CMake's built in function ``add_dependencies``.
 
 
 .. code-block:: cmake
 .. code-block:: cmake
 
 
    function(add_deps target)
    function(add_deps target)
-     add_dependencies(${target} ${ARGV})
+     add_dependencies(${target} ${ARGN})
    endfunction()
    endfunction()
 
 
 This example defines a new macro named ``add_deps`` which takes a required first
 This example defines a new macro named ``add_deps`` which takes a required first