diff options
author | Brad King <brad.king@kitware.com> | 2018-02-16 14:39:10 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-02-16 14:39:47 (GMT) |
commit | 524696ec1007408d5344ce08c1408a56be86b6eb (patch) | |
tree | 2a4a363beba1611f7c6147310d5f05a76d95940b /Help | |
parent | d97c9ffb6c7189d5e617c1d69e8fe168e7813293 (diff) | |
parent | e78e24f68cba269117ad5a321e1ec8503a5f1d29 (diff) | |
download | CMake-524696ec1007408d5344ce08c1408a56be86b6eb.zip CMake-524696ec1007408d5344ce08c1408a56be86b6eb.tar.gz CMake-524696ec1007408d5344ce08c1408a56be86b6eb.tar.bz2 |
Merge topic 'file_cmd_touch'
e78e24f6 Replaces execute_process calls to touch files with file(TOUCH) calls
602988e1 Adds file(TOUCH) and file(TOUCH_NOCREATE) sub-commands
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1705
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`. |