Merge topic 'file-size'

12b471e828 file: add SIZE option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2639
This commit is contained in:
Brad King
2018-11-28 14:05:04 +00:00
committed by Kitware Robot
9 changed files with 69 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ Synopsis
file({`REMOVE`_ | `REMOVE_RECURSE`_ } [<files>...])
file(`MAKE_DIRECTORY`_ [<dir>...])
file({`COPY`_ | `INSTALL`_} <file>... DESTINATION <dir> [...])
file(`SIZE`_ <filename> <out-var>)
`Path Conversion`_
file(`RELATIVE_PATH`_ <out-var> <directory> <file>)
@@ -333,6 +334,16 @@ and ``NO_SOURCE_PERMISSIONS`` is default.
Installation scripts generated by the :command:`install` command
use this signature (with some undocumented options for internal use).
.. _SIZE:
.. code-block:: cmake
file(SIZE <filename> <variable>)
Determine the file size of the ``<filename>`` and put the result in
``<variable>`` variable. Requires that ``<filename>`` is a valid path
pointing to a file and is readable.
Path Conversion
^^^^^^^^^^^^^^^