diff options
| author | Lang Hames <lhames@gmail.com> | 2017-08-24 05:38:39 +0000 |
|---|---|---|
| committer | Lang Hames <lhames@gmail.com> | 2017-08-24 05:38:39 +0000 |
| commit | cbe694be03fad129bbc9b7c5f367e67ac7068322 (patch) | |
| tree | 51ff457faf144d8f65ddd8d18f1b66aede5d468f /llvm/docs/CMakePrimer.rst | |
| parent | 7febf2baff79e29d1e3b0c445407c3ce1df0f685 (diff) | |
| download | bcm5719-llvm-cbe694be03fad129bbc9b7c5f367e67ac7068322.tar.gz bcm5719-llvm-cbe694be03fad129bbc9b7c5f367e67ac7068322.zip | |
[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.
llvm-svn: 311632
Diffstat (limited to 'llvm/docs/CMakePrimer.rst')
| -rw-r--r-- | llvm/docs/CMakePrimer.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/docs/CMakePrimer.rst b/llvm/docs/CMakePrimer.rst index 7f9bc727965..72ebffa5bdd 100644 --- a/llvm/docs/CMakePrimer.rst +++ b/llvm/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 addition, all commands will implicitly accept a variable number of extra 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 function(add_deps target) - add_dependencies(${target} ${ARGV}) + add_dependencies(${target} ${ARGN}) endfunction() This example defines a new macro named ``add_deps`` which takes a required first |

