summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/file.rst17
-rw-r--r--Help/command/string.rst29
2 files changed, 39 insertions, 7 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/command/string.rst b/Help/command/string.rst
index fb3893f..cd94bb4 100644
--- a/Help/command/string.rst
+++ b/Help/command/string.rst
@@ -151,6 +151,16 @@ CONCAT
Concatenate all the input arguments together and store
the result in the named output variable.
+JOIN
+""""
+
+::
+
+ string(JOIN <glue> <output variable> [<input>...])
+
+Join all the input arguments together using the glue
+string and store the result in the named output variable.
+
TOLOWER
"""""""
@@ -282,6 +292,18 @@ CONFIGURE
Transform a string like :command:`configure_file` transforms a file.
+MAKE_C_IDENTIFIER
+"""""""""""""""""
+
+::
+
+ string(MAKE_C_IDENTIFIER <input string> <output variable>)
+
+Convert each non-alphanumeric character in the ``<input string>`` to an
+underscore and store the result in the ``<output variable>``. If the first
+character of the string is a digit, an underscore will also be prepended to
+the result.
+
RANDOM
""""""
@@ -346,13 +368,6 @@ If no explicit ``<format string>`` is given it will default to:
%Y-%m-%dT%H:%M:%S for local time.
%Y-%m-%dT%H:%M:%SZ for UTC.
-
-::
-
- string(MAKE_C_IDENTIFIER <input string> <output variable>)
-
-Write a string which can be used as an identifier in C.
-
.. note::
If the ``SOURCE_DATE_EPOCH`` environment variable is set,