diff options
author | Shane Parris <shane.lee.parris@gmail.com> | 2018-01-26 18:42:35 (GMT) |
---|---|---|
committer | Shane Parris <shane.lee.parris@gmail.com> | 2018-02-15 15:54:18 (GMT) |
commit | 602988e1e568048dd30e9e2213bc788f7c7ff708 (patch) | |
tree | b151fbe9f470fbd8e6e6dee34a43356fda794343 /Help | |
parent | a2ec98b7d97df67d50e90e790b2bd235f7c278cc (diff) | |
download | CMake-602988e1e568048dd30e9e2213bc788f7c7ff708.zip CMake-602988e1e568048dd30e9e2213bc788f7c7ff708.tar.gz CMake-602988e1e568048dd30e9e2213bc788f7c7ff708.tar.bz2 |
Adds file(TOUCH) and file(TOUCH_NOCREATE) sub-commands
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/file.rst | 17 | ||||
-rw-r--r-- | Help/release/dev/file_cmd_touch.rst | 6 |
2 files changed, 23 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>`` diff --git a/Help/release/dev/file_cmd_touch.rst b/Help/release/dev/file_cmd_touch.rst new file mode 100644 index 0000000..b1b1e3c --- /dev/null +++ b/Help/release/dev/file_cmd_touch.rst @@ -0,0 +1,6 @@ +file_cmd_touch +------------------ + +* The :command:`file(TOUCH)` and :command:`file(TOUCH_NOCREATE)` commands + were added to expose TOUCH functionality without having to use CMake's + command-line tool mode with :command:`execute_process`. |