summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-11-28 14:05:04 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-11-28 14:05:16 (GMT)
commit5daf7d92f8971f13fb2f6fac117f44f355ec504a (patch)
treeb47d11b26eedf8aa55d4f440f75c46378054b643 /Help
parent18b9cf4abc351f98bbf549604d3c327a554a0143 (diff)
parent12b471e828e4462cce4354c87bb4fe18aeb600e3 (diff)
downloadCMake-5daf7d92f8971f13fb2f6fac117f44f355ec504a.zip
CMake-5daf7d92f8971f13fb2f6fac117f44f355ec504a.tar.gz
CMake-5daf7d92f8971f13fb2f6fac117f44f355ec504a.tar.bz2
Merge topic 'file-size'
12b471e828 file: add SIZE option Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2639
Diffstat (limited to 'Help')
-rw-r--r--Help/command/file.rst11
-rw-r--r--Help/release/dev/file-size.rst5
2 files changed, 16 insertions, 0 deletions
diff --git a/Help/command/file.rst b/Help/command/file.rst
index f5279c0..26a9ae2 100644
--- a/Help/command/file.rst
+++ b/Help/command/file.rst
@@ -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
^^^^^^^^^^^^^^^
diff --git a/Help/release/dev/file-size.rst b/Help/release/dev/file-size.rst
new file mode 100644
index 0000000..4f0e196
--- /dev/null
+++ b/Help/release/dev/file-size.rst
@@ -0,0 +1,5 @@
+file-size
+---------
+
+* The :command:`file` command gained a ``SIZE`` mode to get the size
+ of a file on disk.