summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
authorShane Parris <shane.lee.parris@gmail.com>2018-01-26 18:42:35 (GMT)
committerShane Parris <shane.lee.parris@gmail.com>2018-02-15 15:54:18 (GMT)
commit602988e1e568048dd30e9e2213bc788f7c7ff708 (patch)
treeb151fbe9f470fbd8e6e6dee34a43356fda794343 /Help/command
parenta2ec98b7d97df67d50e90e790b2bd235f7c278cc (diff)
downloadCMake-602988e1e568048dd30e9e2213bc788f7c7ff708.zip
CMake-602988e1e568048dd30e9e2213bc788f7c7ff708.tar.gz
CMake-602988e1e568048dd30e9e2213bc788f7c7ff708.tar.bz2
Adds file(TOUCH) and file(TOUCH_NOCREATE) sub-commands
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/file.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Help/command/file.rst b/Help/command/file.rst
index 5ce86e5..5e18077 100644
--- a/Help/command/file.rst
+++ b/Help/command/file.rst
@@ -285,6 +285,23 @@ If neither ``TLS`` option is given CMake will check variables
::
+ file(TOUCH [<files>...])
+ file(TOUCH_NOCREATE [<files>...])
+
+Create a file with no content if it does not yet exist. If the file already
+exists, its access and/or modification will be updated to the time when the
+function call is executed.
+
+Use TOUCH_NOCREATE to touch a file if it exists but not create it. If a file
+does not exist it will be silently ignored.
+
+With TOUCH and TOUCH_NOCREATE the contents of an existing file will not be
+modified.
+
+------------------------------------------------------------------------------
+
+::
+
file(TIMESTAMP <filename> <variable> [<format>] [UTC])
Compute a string representation of the modification time of ``<filename>``